From: "Noah yan" <noah.yan@gmail.com>
To: "Noah yan" <noah.yan@gmail.com>, binutils@sourceware.org
Subject: Re: remove the PF_W of the text program section
Date: Wed, 09 Aug 2006 18:04:00 -0000 [thread overview]
Message-ID: <59521b110608091057k7bff7f29wfc9e2eef8ec44af8@mail.gmail.com> (raw)
In-Reply-To: <20060809005816.GB6370@bubble.grove.modra.org>
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
>
next prev parent reply other threads:[~2006-08-09 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 0:26 Noah yan
2006-08-09 0:44 ` Alan Modra
2006-08-09 0:58 ` Noah yan
2006-08-09 1:24 ` Alan Modra
2006-08-09 18:04 ` Noah yan [this message]
2006-08-10 3:53 ` Alan Modra
2006-08-10 14:08 ` Noah yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59521b110608091057k7bff7f29wfc9e2eef8ec44af8@mail.gmail.com \
--to=noah.yan@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).