]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Work around binutils quirk on OpenBSD 5.7
authorMichael Brown <mcb30@ipxe.org>
Fri, 17 Apr 2015 23:53:27 +0000 (00:53 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 17 Apr 2015 23:53:27 +0000 (00:53 +0100)
The assembler on OpenBSD 5.7 seems not to correctly handle the
combinations of .struct and .previous used in unlzma.S, and ends up
complaining about an "attempt to allocate data in absolute section".

Work around this problem by explicitly resetting the section after the
data structure definitions.

Reported-by: Jiri B <jirib@devio.us>
Tested-by: Jiri B <jirib@devio.us>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/prefix/unlzma.S

index 7250a0309b8ac00014e7221be90df7a2ee9fd236..8d4b3c1a87ae9c33a8538ff02aaa6c8ba411223e 100644 (file)
@@ -232,6 +232,9 @@ literal:    .rept   ( ( 1 << LZMA_LC ) * 0x300 )
        .equ    sizeof__lzma_dec, . - lzma_dec
        .previous
 
+       /* Some binutils versions seem not to handle .struct/.previous */
+       .section ".prefix.lib", "ax", @progbits
+
 /*****************************************************************************
  * Normalise range encoder
  *