]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Fix building on Ubuntu 8.04
authorMichael Brown <mcb30@nog.etherboot.org>
Fri, 17 Oct 2008 00:39:48 +0000 (20:39 -0400)
committerMichael Brown <mcb30@etherboot.org>
Fri, 17 Oct 2008 00:55:58 +0000 (01:55 +0100)
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.

src/arch/i386/prefix/dskprefix.S
src/arch/i386/prefix/hdprefix.S
src/arch/i386/prefix/libprefix.S
src/arch/i386/prefix/lkrnprefix.S
src/arch/i386/prefix/nbiprefix.S
src/arch/i386/prefix/romprefix.S
src/arch/i386/scripts/i386.lds

index 096222190e39d6c798a6436be4151d986728e2fe..e3a39cce68096ca7ce253f062673bf69f0417d74 100644 (file)
@@ -145,7 +145,7 @@ got_sectors:
        ljmp    $SYSSEG, $start_runtime
 
 endseg:        .word SYSSEG + _filesz_pgh
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBW"
        .long   endseg
        .long   16
index fd82e405bf6d5c3f5ded46492dd017ae4bedac1c..ffe1ee573b2c4f4d0dec75f5106576a5ed67fdb5 100644 (file)
@@ -65,7 +65,7 @@ max_head:
 load_length:
        .long   _filesz_sect
        
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBL"
        .long   load_length
        .long   512
index 8d9ab956596a86d07961ada4c1811f2bd1991a4a..60dce8e4b331b80e6265e6be1264ca2066c1fdf8 100644 (file)
@@ -679,7 +679,7 @@ prot_call_vector:
 
        /* File split information for the compressor */
 #if COMPRESS
-       .section ".zinfo", "a"
+       .section ".zinfo", "a", @progbits
        .ascii  "COPY"
        .long   _prefix_lma
        .long   _prefix_filesz
@@ -697,7 +697,7 @@ prot_call_vector:
        .long   _textdata_filesz
        .long   _max_align
 #else /* COMPRESS */
-       .section ".zinfo", "a"
+       .section ".zinfo", "a", @progbits
        .ascii  "COPY"
        .long   _prefix_lma
        .long   _filesz
index f9fba7d8124fa67c995865d9e11fb3cd14135132..f23e4076aa917bce2f59892a4174c65d15e1abf9 100644 (file)
@@ -94,7 +94,7 @@ root_flags:
 syssize: 
        .long   _filesz_pgh - PREFIXPGH
 
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBL"
        .long   syssize
        .long   16
index 7a814b7ad6c97a2c3ded580e49f2c31ab2041545..ec2100947101e7f323d117a67517d2235f0e2427 100644 (file)
@@ -36,7 +36,7 @@ imglen:       .long   _filesz - 512
 memlen:        .long   _filesz - 512
        .size   segment_header, . - segment_header
 
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBL"
        .long   imglen
        .long   1
index 00f7abc7be6577318d0c931bb443f70a17d26d8c..ca32a44199cf4b74b60d284440a4d3cf8aeec2aa 100644 (file)
@@ -42,7 +42,7 @@ checksum:
        .word   pnpheader
        .size romheader, . - romheader
        
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBB"
        .long   romheader_size
        .long   512
@@ -69,7 +69,7 @@ pciheader_runtime_length:
        .equ pciheader_len, . - pciheader
        .size pciheader, . - pciheader
        
-       .section ".zinfo.fixup", "a"    /* Compressor fixup information */
+       .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
        .ascii  "SUBW"
        .long   pciheader_image_length
        .long   512
index 71bb9fdd1214b645c2450400d42c29cda19b979b..575cb88163f3b668844863a617efc0cc92757bc4 100644 (file)
@@ -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
      *