diff options
author | Elliott Hughes <enh@google.com> | 2020-08-06 16:24:16 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2020-08-06 16:24:16 -0700 |
commit | 341272d909285da90e44015ca41f956fd00b9dd8 (patch) | |
tree | 8512e874ba0dd3cd2871cc5453ccb2fca427e72d /jdsample.c | |
parent | 0241a1304fd183ee24fbdfe6891f18fdedea38f9 (diff) |
Use hidden visibility for jpeg_nbits_table.
The non-upstream change to reuse one copy of jpeg_nbits_table rather
than inline it with the two assembler routines that use it causes issues
when generating a shared library with lld. Specifically:
movzx edx, byte [GOTOFF(ebp, jpeg_nbits_table + ecx)]
causes invalid relocations for jpeg_nbits_table.
Normally if the target symbol is local, both movl $1, foo@GOTOFF(%ecx)
and leal foo@GOTOFF(%eax), %eax will produce a R_386_GOTOFF relocation
referencing a STT_SECTION local symbol. There is no issue for GNU ld or
LLD.
If the target symbol is global and preemptible LLD will report an error
(GNU ld permissively allows it).
The fix is to make jpeg_nbits_table hidden.
Bug: http://b/162610242
Bug: https://issuetracker.google.com/135180511
Change-Id: I4fe75ca0069a047db05ab18eb36e94bf535878f5
Diffstat (limited to 'jdsample.c')
0 files changed, 0 insertions, 0 deletions