This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: ld -r breakage
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: ld -r breakage
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Tue, 13 Jun 2000 14:37:09 +1000 (EST)
- cc: rth at cygnus dot com, jakub at redhat dot com, binutils at sourceware dot cygnus dot com
On Mon, 12 Jun 2000, Nick Clifton wrote:
> OK, but I still think that the reason that 'ld -r' does not change the
> SEC_READONLY attribute of the text section should be a consequence of
> the fact that config.text_read_only is true, and not of the fact that
> link_info.relocatable is true.
Hmm. We started with (1)
config.text_read_only true => make .text read only
config.text_read_only false => don't change .text attributes
This was buggy because "ld -N" needs to mark .text read/write
Then we went to (2)
config.text_read_only true => make .text read only
config.text_read_only false => make .text read/write
This is again incorrect because "ld -r" cleared config.text_read_only so
as to leave the section attributes unchanged as per (1). Under (2), we
get a read/write .text section.
I suggested testing link_info.relocatable so that "ld -r" would again
leave the section attributes unchanged. It's true that the patch I
submitted should have removed the unnecessary clearing of
config.text_read_only for `-r' (and `-Ur').
Now you seem to be saying (3)
config.text_read_only true => don't change .text attributes
config.text_read_only false => make .text read/write
??
--
Linuxcare. Support for the Revolution.