Fix a linker error on x86-64 Linux when not using a version script.

If the version script produced by the libvpx build system is not
 used when linking a shared library on x86-64 Linux, the constant
 data in the subpel filters produces R_X86_64_32 relocation errors
 due to the use of wrt rip addressing instead of
 wrt rip wrt ..gotpcrel.
Instead of adding a new macro for this addressing mode, this patch
 sets the ELF visibility of these symbols to "hidden", which
 allows wrt rip addressing to work without a text relocation.
This allows building a shared library without using the provided
 build system or a separate version script.
Fixes http://code.google.com/p/webm/issues/detail?id=46

Change-Id: Ie108f9d9a4352e5af46938bf4750d2302c1b2dc2
This commit is contained in:
Timothy B. Terriberry 2010-06-17 19:33:52 -07:00 коммит произвёл John Koleszar
Родитель 220daa00e0
Коммит 9f81463454
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -731,7 +731,7 @@ rd:
times 4 dw 0x40
align 16
global sym(vp8_six_tap_mmx)
global sym(vp8_six_tap_mmx) HIDDEN_DATA
sym(vp8_six_tap_mmx):
times 8 dw 0
times 8 dw 0
@ -791,7 +791,7 @@ sym(vp8_six_tap_mmx):
align 16
global sym(vp8_bilinear_filters_mmx)
global sym(vp8_bilinear_filters_mmx) HIDDEN_DATA
sym(vp8_bilinear_filters_mmx):
times 8 dw 128
times 8 dw 0

Просмотреть файл

@ -138,12 +138,16 @@
%endmacro
%endif
%endif
%define HIDDEN_DATA
%else
%macro GET_GOT 1
%endmacro
%define GLOBAL wrt rip
%ifidn __OUTPUT_FORMAT__,elf64
%define WRT_PLT wrt ..plt
%define HIDDEN_DATA :data hidden
%else
%define HIDDEN_DATA
%endif
%endif
%ifnmacro GET_GOT