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
and also set Configuration::OSABI to ELFOSABI_FREEBSD for those
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.