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: multiple SECTIONS and/or MEMORY commands


On Mon, Oct 29, 2001 at 09:45:04PM +0000, John Marshall wrote:
> The ld documention (in the Options node) cautions
> 
> 	Note that specifying a script in this way [as an implicit linker
> 	script] should only be used to augment the main linker script;
> 	if you want to use some command that logically can only appear
> 	once, such as the `SECTIONS' or `MEMORY' command, you must
> 	replace the default linker script using the `-T' option. 
> 
> Is this appearing-only-once thing simply convention, or is there (or might
> there be in the future) something in the linker that depends on it?

There may have been some such restriction in the past, but looking at
ldgram.y, I see no reason why you can't have multiple MEMORY or SECTIONS
commands.  If there is a contradiction between ld.texinfo and ldgram.y,
ldgram.y is the definitive source. ;-)

Alan


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