diff options
-rw-r--r-- | README.chromium | 6 | ||||
-rw-r--r-- | jpeg_nbits_table.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/README.chromium b/README.chromium index 1831dae..c0992dd 100644 --- a/README.chromium +++ b/README.chromium @@ -48,7 +48,11 @@ following changes which are not merged to upstream: in the header instead of static const and moving the definition to a new .c file fixes this so only one copy is referenced. Also added extern wrappers around usage in asm files. The jpeg_nbits_table.inc - file was also deleted. + file was also deleted. It was also necessary to give this table hidden + visibility to avoid invalid relocations (ignored by ld but rejected by + lld) arising from attempts to reference the table from assembler on + 32-bit x86. This only affects shared libraries, but that's important + for downstream Android builds. * Arm NEON patches to improve performance and maintainability. These changes are tracked by the following Chromium issue: https://crbug.com/922430 - Add memory alignment size check in jmemmgr.c diff --git a/jpeg_nbits_table.c b/jpeg_nbits_table.c index 70fd120..afcee74 100644 --- a/jpeg_nbits_table.c +++ b/jpeg_nbits_table.c @@ -1,5 +1,9 @@ #include "jpeg_nbits_table.h" +/* NOTE: Both GCC and Clang define __GNUC__ */ +#if defined __GNUC__ +__attribute__((visibility("hidden"))) +#endif const unsigned char jpeg_nbits_table[65536] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |