ld -r breakage

Nick Clifton nickc@cygnus.com
Tue Jun 13 11:29:00 GMT 2000

Hi Alan,

: > 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
: ??

OK - sorry for all this confusion.  I actually agree with scenario (2)
above, although I obviously did not express myself clearly.  If you
would care to resubmit your patch (with the fix to -r and -Ur that you
mention above) then I will be happy yto approve it.


More information about the Binutils mailing list