Skip to content

Commit

Permalink
[build] Work around binutils quirk on OpenBSD 5.7
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcb30 committed Apr 17, 2015
1 parent b594bfd commit dac866b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/arch/i386/prefix/unlzma.S
Expand Up @@ -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
*
Expand Down

0 comments on commit dac866b

Please sign in to comment.