This is the mail archive of the binutils@sources.redhat.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: writing linker scripts...


At 9:40 AM -0700 4/28/01, H . J . Lu wrote:

>On Sat, Apr 28, 2001 at 09:40:36AM +0100, Nick Clifton wrote:
>> Hi Alan,
>>
>> > Nick,
>> >
>> >   The -no-check-sections was just the ticket.
>> >
>> >   Is there anyway to set that from inside the linker script, so that it's ALWAYS
>> > asserted?
>> >
>> >   I know I could make gcc always pass -Wl,-no-check-sections to every compile, but
>> > I want to catch people who think that they can do 'ld' commands directly too.
>>
>> I thought about this at the time I wrote my original reply, but I do
>> not believe that there is a way (currently) to do this.
>
>Why not? I have done that in the gcc specs file before. You can add
>
>%{!rcheck-sections: -no-check-sections}
>
>to LINK_SPEC. Then you can do

	No, you misunderstand.

	I don't EVER want to link without the -no-check-sections....

	I want to make sure that anyone who does a direct invocation of 'ld' ALSO gets the
	free -no-check-sections asserted, as this machine ALWAYS has an overlap.  It's a
	harvard architecture machine with 512 32 bit registers (directly addressable),
	absolutely NO other data memory, and 2k 32 bit instruction words.

	Interestingly enough, this turns out to be EXACTLY enough memory to hold an internet
	packet routing implementation (assuming that only packet headers are ever loaded into
	the processor memory, and assuming that there's some pretty funky hardware to deal with
	IP to gateway mapping)

	What might be a good general solution would be to add a new keyword to the linker-scripting
	language - say:

		OPTIONS (flag,....,flag)

	the comma-list would be bundled up and passed to the linker's command-line flag processor to
	change the flag settings....

	-- Al
-- 
------------------------------------------------------------------------

		    Quality Software Management
		http://home.earthlink.net/users/~qsmgmt
			apl@alum.mit.edu
			(978)287-0435 Voice
			(978)808-6836 Cell
			(978)287-0436 Fax

	Software Process Improvement and Management Consulting
	     Language Design and Compiler Implementation


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