diff options
author | Michael Brown | 2008-10-17 02:39:48 +0200 |
---|---|---|
committer | Michael Brown | 2008-10-17 02:55:58 +0200 |
commit | 04f32065813b41aed2474472ad6819136c5fa142 (patch) | |
tree | a5433d586d2a1f95d9c19e50a64bee393b0642cb /src/arch/i386/scripts/i386.lds | |
parent | [etherfabric] Merge changes from vendor tree (diff) | |
download | ipxe-04f32065813b41aed2474472ad6819136c5fa142.tar.gz ipxe-04f32065813b41aed2474472ad6819136c5fa142.tar.xz ipxe-04f32065813b41aed2474472ad6819136c5fa142.zip |
[build] Fix building on Ubuntu 8.04
Not fully understood, but it seems that the LMA of bss sections matters
for some newer binutils builds. Force all bss sections to have an LMA
at the end of the file, so that they don't interfere with other
sections.
The symptom was that objcopy -O binary -j .zinfo would extract the
.zinfo section from bin/xxx.tmp as a blob of the correct length, but
with zero contents. This would then cause the [ZBIN] stage of the
build to fail.
Also explicitly state that .zinfo(.*) sections have @progbits, in case
some future assembler or linker variant decides to omit them.
Diffstat (limited to 'src/arch/i386/scripts/i386.lds')
-rw-r--r-- | src/arch/i386/scripts/i386.lds | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/arch/i386/scripts/i386.lds b/src/arch/i386/scripts/i386.lds index 71bb9fdd..575cb881 100644 --- a/src/arch/i386/scripts/i386.lds +++ b/src/arch/i386/scripts/i386.lds @@ -34,7 +34,7 @@ SECTIONS { *(.prefix) *(.prefix.*) _mprefix = .; - } .prefix_bss (NOLOAD) : { + } .prefix_bss (NOLOAD) : AT ( _end_lma ) { _eprefix = .; } _prefix_filesz = ABSOLUTE ( _mprefix - _prefix ); @@ -52,7 +52,7 @@ SECTIONS { *(.text16) *(.text16.*) _mtext16 = .; - } .text16_bss (NOLOAD) : { + } .text16_bss (NOLOAD) : AT ( _end_lma ) { _etext16 = .; } _text16_filesz = ABSOLUTE ( _mtext16 - _text16 ); @@ -71,7 +71,7 @@ SECTIONS { *(.data16) *(.data16.*) _mdata16 = .; - } .data16_bss (NOLOAD) : { + } .data16_bss (NOLOAD) : AT ( _end_lma ) { *(.bss16) *(.bss16.*) *(.stack16) @@ -98,7 +98,7 @@ SECTIONS { *(.data.*) *(SORT(.tbl.*)) /* Various tables. See include/tables.h */ _mtextdata = .; - } .textdata_bss (NOLOAD) : { + } .textdata_bss (NOLOAD) : AT ( _end_lma ) { *(.bss) *(.bss.*) *(COMMON) @@ -119,7 +119,7 @@ SECTIONS { *(.zinfo) *(.zinfo.*) _mzinfo = .; - } .zinfo_bss (NOLOAD) : { + } .zinfo_bss (NOLOAD) : AT ( _end_lma ) { _ezinfo = .; } _zinfo_filesz = ABSOLUTE ( _mzinfo - _zinfo ); @@ -130,7 +130,7 @@ SECTIONS { * */ - .weak 0x0 : { + .weak 0x0 : AT ( _end_lma ) { _weak = .; *(.weak) _eweak = .; @@ -181,6 +181,8 @@ SECTIONS { . += _zinfo_filesz; . = ALIGN ( _max_align ); + _end_lma = .; + /* * Values calculated to save code from doing it * |