From: martin@martin.st
Description: ppc: Fix compilation for ppc64le
Origin: upstream, http://patches.libav.org/patch/50835/
Patch taken from
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/1263802,
with some minor fixups.
This fixes compilation for this target (tested with a cross compiler),
but it's completely untested in practice so far (qemu doesn't support
it yet, and I don't have any such hardware to test it on).
|
old
|
new
|
|
| 36 | 36 | |
| 37 | 37 | .macro extfunc name |
| 38 | 38 | .global X(\name) |
| | 39 | #if _CALL_ELF == 2 |
| | 40 | .text |
| | 41 | X(\name): |
| | 42 | addis %r2, %r12, .TOC.-X(\name)@ha |
| | 43 | addi %r2, %r2, .TOC.-X(\name)@l |
| | 44 | .localentry X(\name), .-X(\name) |
| | 45 | #else |
| 39 | 46 | .section .opd, "aw" |
| 40 | 47 | X(\name): |
| 41 | 48 | .quad L(\name), .TOC.@tocbase, 0 |
| 42 | 49 | .previous |
| 43 | 50 | .type X(\name), STT_FUNC |
| 44 | 51 | L(\name): |
| | 52 | #endif |
| 45 | 53 | .endm |
| 46 | 54 | |
| 47 | 55 | .macro movrel rd, sym, gp |