mirror of https://github.com/xiph/flac
Fix assembler code to make it PIC so the dynamic linker does
not have to do text relocations on-the-fly. Patch from Gentoo via Jaren Stangret <sirjaren@gmail.com> Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
This commit is contained in:
parent
a9f3bc8eed
commit
12022d90dd
|
@ -139,8 +139,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
|||
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc)
|
||||
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
|
||||
mov edi, _FLAC__crc16_table
|
||||
%else
|
||||
%ifdef OBJ_FORMAT_elf
|
||||
mov edi, [esp + 16] ; saved ebx (GOT base)
|
||||
lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
|
||||
%else
|
||||
mov edi, FLAC__crc16_table
|
||||
%endif
|
||||
%endif
|
||||
;; eax (ax) crc a.k.a. br->read_crc
|
||||
;; ebx (bl) intermediate result index into FLAC__crc16_table[]
|
||||
|
@ -215,8 +220,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
|||
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc)
|
||||
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
|
||||
mov edi, _FLAC__crc16_table
|
||||
%else
|
||||
%ifdef OBJ_FORMAT_elf
|
||||
mov edi, [esp + 16] ; saved ebx (GOT base)
|
||||
lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
|
||||
%else
|
||||
mov edi, FLAC__crc16_table
|
||||
%endif
|
||||
%endif
|
||||
;; eax (ax) crc a.k.a. br->read_crc
|
||||
;; ebx (bl) intermediate result index into FLAC__crc16_table[]
|
||||
|
@ -315,8 +325,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
|||
push ebp ; /* push br argument */
|
||||
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
|
||||
call _bitreader_read_from_client_
|
||||
%else
|
||||
%ifdef OBJ_FORMAT_elf
|
||||
mov ebx, [esp + 20] ; saved ebx (GOT base)
|
||||
call bitreader_read_from_client_ wrt ..plt
|
||||
%else
|
||||
call bitreader_read_from_client_
|
||||
%endif
|
||||
%endif
|
||||
pop edx ; /* discard, unused */
|
||||
pop ecx ; /* restore */
|
||||
|
@ -363,13 +378,20 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
|||
mov [ebp + 16], esi ; br->consumed_words = cwords;
|
||||
mov [ebp + 20], ecx ; br->consumed_bits = cbits;
|
||||
push ecx ; /* save */
|
||||
push ebx ; /* save */
|
||||
push ebp ; /* push br argument */
|
||||
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
|
||||
call _bitreader_read_from_client_
|
||||
%else
|
||||
%ifdef OBJ_FORMAT_elf
|
||||
mov ebx, [esp + 24] ; saved ebx (GOT base)
|
||||
call bitreader_read_from_client_ wrt ..plt
|
||||
%else
|
||||
call bitreader_read_from_client_
|
||||
%endif
|
||||
%endif
|
||||
pop edx ; /* discard, unused */
|
||||
pop ebx ; /* restore */
|
||||
pop ecx ; /* restore */
|
||||
mov esi, [ebp + 16] ; cwords = br->consumed_words;
|
||||
; ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
|
||||
|
@ -437,8 +459,13 @@ cident FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap
|
|||
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc)
|
||||
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE
|
||||
mov edi, _FLAC__crc16_table
|
||||
%else
|
||||
%ifdef OBJ_FORMAT_elf
|
||||
mov edi, [esp + 24] ; saved ebx (GOT base)
|
||||
lea edi, [edi + FLAC__crc16_table wrt ..gotoff]
|
||||
%else
|
||||
mov edi, FLAC__crc16_table
|
||||
%endif
|
||||
%endif
|
||||
;; eax (ax) crc a.k.a. br->read_crc
|
||||
;; ebx (bl) intermediate result index into FLAC__crc16_table[]
|
||||
|
|
Loading…
Reference in New Issue