This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: remove the PF_W of the text program section


Hi Alan,

Thanks again for this.

I did the check, all the object files (*.o) are safe (the .text
section flag is all AX), But I found another two .so files that link
into the final object have .got section marked as AWX. are they
creating the problem? if so, how to do with it?

The ld command to create these .so are like: ld -o
debug32/libgenunix.so -G -znoreloc -h genunix debug32/genunix
debug32/kobj_stubs.o

Tnanks again for help!
Noah


Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00800000 010000 072ef0 00 AX 0 0 16 [ 2] .interp PROGBITS 00872ef0 082ef0 00000b 00 A 0 0 1 [ 3] .hash HASH 00872efc 082efc 0020f0 04 A 4 0 4 [ 4] .dynsym DYNSYM 00874fec 084fec 004330 10 A 5 1 4 [ 5] .dynstr STRTAB 0087931c 08931c 003a55 00 A 0 0 1 [ 6] .rela.dyn RELA 0087cd74 08cd74 0002a0 0c A 4 0 4 [ 7] .rela.data RELA 0087d014 08d014 000078 0c A 4 12 4 [ 8] .rodata PROGBITS 0087d08c 08d08c 00cbf8 00 A 0 0 4 [ 9] .rela.bss RELA 00889c84 099c84 0000a8 0c A 4 14 4 [10] .rela.plt RELA 00889d2c 099d2c 000bd0 0c A 4 11 4 [11] .plt NOBITS 0088a8fc 09a8fc 000c18 00 WAX 0 0 4 [12] .data PROGBITS 0088c000 09c000 007f04 04 WAX 0 0 32 [13] .dynamic DYNAMIC 00893f04 0a3f04 0000a8 08 WA 5 0 4 [14] .bss NOBITS 00894000 0a3fac 029198 00 WA 0 0 16 [15] .dynsbss NOBITS 008bd198 0a3fac 000101 00 WA 0 0 8 [16] .comment PROGBITS 00000000 0a3fac 00006d 00 0 0 1


On 8/8/06, Alan Modra <amodra@bigpond.net.au> wrote:
On Tue, Aug 08, 2006 at 05:48:55PM -0700, Noah yan wrote:
> Thanks Alan for your comments. "a writable text section", do you mean
> I need to identify this from sources? if so, only hand-writing
> assembly code can do this and compiler-generated code does not write
> to text section, correct?

Use readelf -S on all the object files involved in the link.  (Use -t
flag with ld to identify the object files.)

--
Alan Modra
IBM OzLabs - Linux Technology Centre



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]