From 806b0752cb54d7aba4e2ffec47170777330cae20 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 25 Apr 2000 00:27:24 +0000 Subject: [PATCH] Note that output section data commands can only appear inside output section descriptions and not between them. --- ld/ChangeLog | 5 +++++ ld/ld.texinfo | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index cb0e2573c7..36bd2dbd80 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2000-04-24 Nick Clifton + + * ld.texinfo (Output Section Data): Add note that section data + commands cannot appear outside of section directives. + 2000-04-2 Matthew Green * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support. diff --git a/ld/ld.texinfo b/ld/ld.texinfo index c9d0fc6c73..e8c11d9544 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -2486,6 +2486,16 @@ When the object file format does not have an explicit endianness, as is true of, for example, S-records, the value will be stored in the endianness of the first input object file. +Note - these commands only work inside a section description and not +between them, so the following will produce an error from the linker: +@smallexample +SECTIONS @{@ .text : @{@ *(.text) @}@ LONG(1) .data : @{@ *(.data) @}@ @}@ +@end smallexample +whereas this will work: +@smallexample +SECTIONS @{@ .text : @{@ *(.text) ; LONG(1) @}@ .data : @{@ *(.data) @}@ @}@ +@end smallexample + @kindex FILL(@var{expression}) @cindex holes, filling @cindex unspecified memory -- 2.11.0