diff options
Diffstat (limited to 'loader')
-rw-r--r-- | loader/Makefile | 3 | ||||
-rwxr-xr-x | loader/loader_objfix.sh | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/loader/Makefile b/loader/Makefile index aa2cd4a05c..c1035125b0 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -32,6 +32,9 @@ distclean: clean libloader.a: $(LIB_OBJECTS) stubs.s $(CC) -c ./stubs.s -o stubs.o +ifeq ($(TARGET_OS),OpenBSD) + ./loader_objfix.sh +endif $(AR) -r libloader.a $(LIB_OBJECTS) stubs.o dep: diff --git a/loader/loader_objfix.sh b/loader/loader_objfix.sh new file mode 100755 index 0000000000..99eb27a7f0 --- /dev/null +++ b/loader/loader_objfix.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# This script fixes up symbol mangling in GNU as code of stubs.s. +# This file is licensed under the GPL, more info at http://www.fsf.org/ +for i in "export_names" \ + "printf" \ + "exp_EH_prolog" \ + "unk_exp1" +do +echo "fixing: $i=_$i" +objcopy --redefine-sym "$i=_$i" stubs.o +done |