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,

On 8/9/06, Alan Modra <amodra@bigpond.net.au> wrote:
On Wed, Aug 09, 2006 at 10:57:09AM -0700, Noah yan wrote:
> 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?

No, they won't be causing a problem.  (.so sections are not linked into
your executable.)

Hmm, I guess I should have told you to generate a map file before
looking at all the input files.  A map file will tell you which input
file sections are linked into the output .text section.  You probably
will find that some other (writable) section is being linked to .text.
If that is the case, then the cure is to fix your linker script.  (I
gather from a previous comment that you are using your own linker
script.)
There is one section .plt that is RWX is linked into .text. but when i
put it in the .data section in the script file. The .data section
program header is gone and all (.text, .data, .bss) moves to .text
sections.

Noah

-- 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]