This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: Q: Reasoning behind ld -r/-Ur turning off READONLY section flag?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]