After 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.
I think we want to start using a new struct instead of tuple then.