Summary: | devel/nasm emits wrong ELF brand | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | unitrunker <unitrunker> | ||||
Component: | Individual Port(s) | Assignee: | Niclas Zeising <zeising> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | dim, zeising | ||||
Priority: | --- | Flags: | zeising:
maintainer-feedback+
zeising: merge-quarterly? |
||||
Version: | Latest | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
unitrunker
2020-03-26 11:09:11 UTC
Additional reference: https://forums.freebsd.org/threads/tiny-nasm-program-wont-run.74681/ Do you know when this started? nasm hasn't had a new release and update in over a year. I wonder if this is a change in lld, or something else? Which version of FreeBSD are you using? I did a quick check, this looks like an issue with ldd, when I use gnu ld to link the object it works as expected. lld has been made the default ld on 12.1 and 13, so that might be the difference from earlier, when it worked. Created attachment 212749 [details]
Fix nasm's ELF_OSABI field when emitting object files
(In reply to Dimitry Andric from comment #4) Note that ideally this would be some sort of command line option, but I think it is too much trouble to bother, unless somebody would want to upstream this (if an upstream even exists? :) This worked fine for me on 11.2-RELEASE. Now on 12.1-RELEASE-p3 (In reply to Dimitry Andric from comment #5) Can ld infer this from the .o file? (In reply to unitrunker from comment #7) Well, it infers that you are attempting to link the wrong type of .o file for the target system. If you want to link a linux .o file, you should use a target of e.g. x86_64-unknown-linux. The default is obviously to link a freebsd executable, and for that you need freebsd-branded object files. It will not attempt to "correct" any badly branded object files. A commit references this bug: Author: zeising Date: Mon Jul 20 18:22:04 UTC 2020 New revision: 542660 URL: https://svnweb.freebsd.org/changeset/ports/542660 Log: devel/nasm: Update to 2.15.03 Update devel/nasm to 2.15.03 Add a patch to fix nasm's ELF_OSABI field when emitting object files [1] Changelog: https://nasm.us/doc/nasmdocc.html PR: 245069 [1] Submitted by: dim [1] Reported by: unitrunker gmail com [1] MFH: 2020Q3 Changes: head/devel/nasm/Makefile head/devel/nasm/distinfo head/devel/nasm/files/ head/devel/nasm/files/patch-output_outelf.c Committed, together with nasm update. Awaiting MFC. A commit references this bug: Author: zeising Date: Wed Jul 22 16:27:33 UTC 2020 New revision: 542873 URL: https://svnweb.freebsd.org/changeset/ports/542873 Log: MFH: r542660 r542869 devel/nasm: Update to 2.15.03 Update devel/nasm to 2.15.03 Add a patch to fix nasm's ELF_OSABI field when emitting object files [1] Changelog: https://nasm.us/doc/nasmdocc.html PR: 245069 [1] Submitted by: dim [1] Reported by: unitrunker gmail com [1] devel/nasm: Update to 2.15.03 Update devel/nasm to 2.15.03 Changelog: https://nasm.us/doc/nasmdocc.html Approved by: ports-secteam (joenum) Changes: _U branches/2020Q3/ branches/2020Q3/devel/nasm/Makefile branches/2020Q3/devel/nasm/distinfo branches/2020Q3/devel/nasm/files/ Merged, closing. |