[Nasm-bugs] [Bug 3392533] Considerations for segment support in ELF

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Mon Jul 15 10:12:01 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392533

--- Comment #29 from stsp2 at yandex.ru ---
I applied that patch, took your linker from here:
https://launchpad.net/~tkchia/+archive/ubuntu/build-ia16/+files/binutils-ia16-elf_2.31.51-20190713.19-ppa190714152~bionic_amd64.deb

... and tried to build fdpp with this change:
---
diff --git a/fdpp/clang.mak b/fdpp/clang.mak
index 335e991..0078837 100644
--- a/fdpp/clang.mak
+++ b/fdpp/clang.mak
@@ -5,8 +5,8 @@
 CC = clang++
 CL = clang++
 CLC = clang
-NASM = nasm
-LINK = ld
+NASM = $(srcdir)/nasm
+LINK = $(srcdir)/ia16-elf-ld

 TARGETOPT = -std=c++11 -c -fno-threadsafe-statics -fno-rtti -fpic
 # _XTRA should go at the end of cmd line
diff --git a/fdpp/plt.S b/fdpp/plt.S
index b55119a..9518793 100644
--- a/fdpp/plt.S
+++ b/fdpp/plt.S
@@ -20,7 +20,7 @@
 %include "segs.inc"
 %include "plt_seg.inc"

-%define _SEG(s) _SEG_%+s
+%define _SEG(s) SEG s

 %macro asmcfunc 4
 segment %3
---

(used LD_LIBRARY_PATH to locate proper libbfd)
It builds indeed but doesn't work.
I almost got used to my hack of extracting segments
with objdump, but it slows down the build twice, so
would be good to have that functionality sooner or later.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list