llvm-project/lld/ELF
Dimitry Andric 19b134cc44 Recognize FreeBSD specific BFD names in OUTPUT_FORMAT
Summary:
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, recognize a `-freebsd` suffix in BFD names, 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.

Reviewers: ruiu, atanasyan, grimar, hokein, emaste, espindola

Reviewed By: ruiu

Subscribers: nemanjai, javed.absar, arichardson, krytarowski, kristof.beyls, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D57283

llvm-svn: 352606
2019-01-30 06:31:52 +00:00
..
Arch [PPC64] Reland r351978 'Sort .toc sections accessed with small code model ...' 2019-01-24 18:17:40 +00:00
AArch64ErrataFix.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AArch64ErrataFix.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Bits.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [LLD][ELF] - Support MSP430. 2019-01-10 13:43:06 +00:00
CallGraphSort.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CallGraphSort.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Config.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DWARF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DWARF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Driver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Driver.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DriverUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
EhFrame.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
EhFrame.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Filesystem.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Filesystem.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ICF.cpp COFF, ELF: ICF: Perform 2 rounds of relocation hash propagation. 2019-01-22 23:54:49 +00:00
ICF.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InputFiles.cpp lld: elf: discard more specific .gnu.linkonce section 2019-01-27 02:54:23 +00:00
InputFiles.h Remove dead declaration. 2019-01-26 00:31:49 +00:00
InputSection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InputSection.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LTO.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LTO.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LinkerScript.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LinkerScript.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MapFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MapFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MarkLive.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [ELF] Implement option to force PIC compatible Thunks 2019-01-16 12:09:13 +00:00
OutputSections.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OutputSections.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp [PPC64] Reland r351978 'Sort .toc sections accessed with small code model ...' 2019-01-24 18:17:40 +00:00
Relocations.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptLexer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScriptParser.cpp Recognize FreeBSD specific BFD names in OUTPUT_FORMAT 2019-01-30 06:31:52 +00:00
ScriptParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolTable.cpp [ELF] Simplify. NFC 2019-01-29 14:24:35 +00:00
SymbolTable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Symbols.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Symbols.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SyntheticSections.cpp ELF: Set sh_info on RelaIplt to point to the IgotPlt output section. 2019-01-28 19:29:41 +00:00
SyntheticSections.h Tentative fix for r351701 and gcc 6.2 build on ubuntu 2019-01-21 07:44:52 +00:00
Target.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Target.h [PPC64] Reland r351978 'Sort .toc sections accessed with small code model ...' 2019-01-24 18:17:40 +00:00
Thunks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Thunks.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Writer.cpp [PPC64] Reland r351978 'Sort .toc sections accessed with small code model ...' 2019-01-24 18:17:40 +00:00
Writer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00

README.md

See docs/NewLLD.rst