summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2015-04-18 01:53:27 +0200
committerMichael Brown2015-04-18 01:53:27 +0200
commitdac866b06669ba17f4fdbad8405b7bbdd7114f1b (patch)
tree483c950b486d9fbecd47649c395ac01e9ed82e61
parent[build] Fix compiler warning on OpenBSD 5.7 (diff)
downloadipxe-dac866b06669ba17f4fdbad8405b7bbdd7114f1b.tar.gz
ipxe-dac866b06669ba17f4fdbad8405b7bbdd7114f1b.tar.xz
ipxe-dac866b06669ba17f4fdbad8405b7bbdd7114f1b.zip
[build] Work around binutils quirk on OpenBSD 5.7
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>
-rw-r--r--src/arch/i386/prefix/unlzma.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/i386/prefix/unlzma.S b/src/arch/i386/prefix/unlzma.S
index 7250a0309..8d4b3c1a8 100644
--- a/src/arch/i386/prefix/unlzma.S
+++ b/src/arch/i386/prefix/unlzma.S
@@ -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
*