Commit 1f9943ab authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

x86inc.asm: fix symbol mangling and PIC handling on Win64/Mac64.

Change-Id: I97aa175346683184f9430d880593b291a563e04f
Showing with 13 additions and 3 deletions
...@@ -46,15 +46,21 @@ ...@@ -46,15 +46,21 @@
%define WIN64 1 %define WIN64 1
%elifidn __OUTPUT_FORMAT__,win64 %elifidn __OUTPUT_FORMAT__,win64
%define WIN64 1 %define WIN64 1
%elifidn __OUTPUT_FORMAT__,x64
%define WIN64 1
%else %else
%define UNIX64 1 %define UNIX64 1
%endif %endif
%endif %endif
%ifdef PREFIX %ifidn __OUTPUT_FORMAT__,elf32
%define mangle(x) _ %+ x %define mangle(x) x
%else %elifidn __OUTPUT_FORMAT__,elf64
%define mangle(x) x
%elifidn __OUTPUT_FORMAT__,x64
%define mangle(x) x %define mangle(x) x
%else
%define mangle(x) _ %+ x
%endif %endif
; FIXME: All of the 64bit asm functions that take a stride as an argument ; FIXME: All of the 64bit asm functions that take a stride as an argument
...@@ -89,11 +95,15 @@ ...@@ -89,11 +95,15 @@
%if WIN64 %if WIN64
%define PIC %define PIC
%elifidn __OUTPUT_FORMAT__,macho64
%define PIC
%elif ARCH_X86_64 == 0 %elif ARCH_X86_64 == 0
; x86_32 doesn't require PIC. ; x86_32 doesn't require PIC.
; Some distros prefer shared objects to be PIC, but nothing breaks if ; Some distros prefer shared objects to be PIC, but nothing breaks if
; the code contains a few textrels, so we'll skip that complexity. ; the code contains a few textrels, so we'll skip that complexity.
%undef PIC %undef PIC
%elif CONFIG_PIC
%define PIC
%endif %endif
%ifdef PIC %ifdef PIC
default rel default rel
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment