[PATCH] D57283: Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 26 09:07:25 PST 2019
dim created this revision.
dim added reviewers: ruiu, atanasyan, grimar, hokein, emaste.
Herald added subscribers: kbarton, kristof.beyls, krytarowski, arichardson, javed.absar, nemanjai.
Herald added a reviewer: espindola.
After rLLD344952 <https://reviews.llvm.org/rLLD344952> ("Add OUTPUT_FORMAT linker script directive support"),
using BFD names such as `elf64-x86-64-freebsd` the `OUTPUT_FORMAT`
linker script command does not work anymore, resulting in errors like:
ld: error: /home/dim/src/clang800-import/stand/efi/loader/arch/amd64/ldscript.amd64:2: unknown output format name: elf64-x86-64-freebsd
>>> OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
>>> ^
To fix this, add the following FreeBSD specific BFD names to
`readBfdName`:
- `elf32-i386-freebsd`
- `elf64-aarch64-freebsd`
- `elf64-powerpc-freebsd`
- `elf64-x86-64-freebsd`
and also set `Configuration::OSABI` to `ELFOSABI_FREEBSD` for those
cases.
Add and/or update several test cases to check for the correct results of
these new `OUTPUT_FORMAT` arguments.
Note that some more generic parsing could probably be implemented, but I
would like to get something accepted for merging into the 8.0 branch, so
we can ship it in FreeBSD.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D57283
Files:
ELF/ScriptParser.cpp
test/ELF/emulation-aarch64.s
test/ELF/emulation-ppc.s
test/ELF/emulation-x86.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57283.183706.patch
Type: text/x-patch
Size: 8836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190126/110a5d10/attachment.bin>
More information about the llvm-commits
mailing list