ref: 5ea9e2a60857e431b064925bfc1b9b19b21c7532
parent: 42a7f68d2e7a5781b56c451b1e46d7fdb1ac73eb
author: Ronald S. Bultje <rbultje@google.com>
date: Wed Jun 20 05:48:54 EDT 2012
x86inc: add some more format identifiers for elf file format recognition. Change-Id: I3582c64200eed3606a4b57a9f78624ec46041461
--- a/third_party/x86inc/x86inc.asm
+++ b/third_party/x86inc/x86inc.asm
@@ -57,6 +57,8 @@
%define mangle(x) x
%elifidn __OUTPUT_FORMAT__,elf64
%define mangle(x) x
+%elifidn __OUTPUT_FORMAT__,elf
+ %define mangle(x) x
%elifidn __OUTPUT_FORMAT__,x64
%define mangle(x) x
%else
@@ -515,6 +517,10 @@
%xdefine current_function %1
%ifidn __OUTPUT_FORMAT__,elf
global %1:function hidden
+ %elifidn __OUTPUT_FORMAT__,elf32
+ global %1:function hidden
+ %elifidn __OUTPUT_FORMAT__,elf64
+ global %1:function hidden
%else
global %1
%endif
@@ -549,6 +555,10 @@
; This is needed for ELF, otherwise the GNU linker assumes the stack is
; executable by default.
%ifidn __OUTPUT_FORMAT__,elf
+SECTION .note.GNU-stack noalloc noexec nowrite progbits
+%elifidn __OUTPUT_FORMAT__,elf32
+SECTION .note.GNU-stack noalloc noexec nowrite progbits
+%elifidn __OUTPUT_FORMAT__,elf64
SECTION .note.GNU-stack noalloc noexec nowrite progbits
%endif
--
⑨