Q: Reasoning behind ld -r/-Ur turning off READONLY section flag?
Nick Clifton
nickc@cygnus.com
Thu Jun 8 10:00:00 GMT 2000
Hi Tom,
: Can anyone tell me the reason why we are resetting the text section
: READONLY flag to R/W on partial links? Didn't notice anything offhand in
: ChangeLog.
:
: case 'i':
: case 'r':
: link_info.relocateable = true;
: config.build_constructors = false;
: config.magic_demand_paged = false;
: config.text_read_only = false; <<<<<<<< Bzzt!
: config.dynamic_link = false;
: break;
You are right, this does look completely bogus. Checking the logs at
Red Hat I found that this line was checked in in Feb 94 by David
Mackenzie (then employed at Cygnus) but all that the ChangeLog entry
says is:
* lexsup.c: Remove #if 0'd code.
(parse_args): Rewrite to use getopt_long_only.
As far as I can tell there is no good reason for the text section to
become read/write on partial relocation, so I think it should be
removed. Unless someone can suggest a reason not to, I will check a
patch in to fix this next week.
Cheers
Nick
More information about the Binutils
mailing list