llvm-project/lld/ELF
George Rimar aad84e2ee2 [ELF] - Resolve references properly when using .symver directive
This is PR28414. 
Previously LLD was unable to link following:
(failed with undefined symbol bar)

```
Version script:
SOME_VERSION { global: *; };

.global _start
.global bar
.symver _start, bar@@SOME_VERSION
_start:
  jmp bar
```

Manual has next description:
//
.symver name, name2@@nodename
In this case, the symbol name must exist and be defined within the file being assembled. It is similar to name2@nodename. 
**The difference is name2@@nodename will also be used to resolve references to name2 by the linker**
https://sourceware.org/binutils/docs/as/Symver.html
//

Patch implements that. If we have name@@ver symbol and name is undefined, 
name@@ver is used to resolve references to name.

Differential revision: https://reviews.llvm.org/D33680

llvm-svn: 306813
2017-06-30 10:19:54 +00:00
..
Arch Delete comparison with GlobalOffsetTable. 2017-06-28 23:19:32 +00:00
CMakeLists.txt Add basic 64-bit SPARC support 2017-06-28 17:05:39 +00:00
Config.h Keep the original symbol name when renamed. 2017-06-22 17:30:19 +00:00
Driver.cpp Implement the --exclude-libs option. 2017-06-21 15:36:24 +00:00
Driver.h [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
DriverUtils.cpp Fix argument numbersing in OPTION macro 2017-06-20 19:17:58 +00:00
EhFrame.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
EhFrame.h Convert InputSectionBase to a class. 2017-02-23 02:28:28 +00:00
Error.cpp Flush output in log() 2017-04-28 21:35:02 +00:00
Error.h Update comments. 2017-03-30 22:57:49 +00:00
Filesystem.cpp Make LLD work even if the current directory is not writable. 2017-04-26 16:15:07 +00:00
Filesystem.h Move code to emit error messages from Filesystem.cpp to Driver.cpp. 2017-04-26 16:14:46 +00:00
GdbIndex.cpp Remove a comment that is taken from gdb man page. 2017-03-29 00:09:40 +00:00
GdbIndex.h [ELF] - Make implementation of .gdb index to be more natural for futher paralleling. 2017-06-07 16:59:11 +00:00
ICF.cpp ELF: Teach ICF about relocations referring to merge input sections. 2017-06-12 00:05:54 +00:00
ICF.h Do not pass Symtab to markLive/doICF since Symtab is globally accessible. 2016-05-02 19:30:42 +00:00
InputFiles.cpp Tweak to match change in LLVM API, in r306699 2017-06-29 16:52:29 +00:00
InputFiles.h Implement the --exclude-libs option. 2017-06-21 15:36:24 +00:00
InputSection.cpp [ELF] make default for get{ARM,AArch64}UndefinedRelativeWeakVA unreachable 2017-06-19 09:43:43 +00:00
InputSection.h Simplify. NFC. 2017-06-09 03:19:08 +00:00
LTO.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
LTO.h ELF: Add ThinLTO caching support. 2017-03-01 23:00:10 +00:00
LinkerScript.cpp Move `assert` upwards so that it fails early if it fails. 2017-06-26 17:11:36 +00:00
LinkerScript.h Move clearOutputSections before sortSections. 2017-06-15 21:51:01 +00:00
MapFile.cpp Keep a list of all OutputSectionCommands. 2017-05-30 01:30:14 +00:00
MapFile.h Keep a list of all OutputSectionCommands. 2017-05-30 01:30:14 +00:00
MarkLive.cpp ELF: Don't dereference Repl in MarkLive. NFCI. 2017-06-21 21:29:51 +00:00
Memory.h Remove lld/Support/Memory.h. 2016-12-18 14:06:06 +00:00
Options.td Implement the --exclude-libs option. 2017-06-21 15:36:24 +00:00
OutputSections.cpp Remove confusing `return`. 2017-06-26 16:52:16 +00:00
OutputSections.h Make OutputSections and OutputSectionCommands globals. 2017-06-13 23:26:31 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
Relocations.cpp [ELF] Define _GLOBAL_OFFSET_TABLE_ symbol relative to .got 2017-06-26 10:22:17 +00:00
Relocations.h [ELF] Enable createThunks to be called more than once. 2017-06-16 13:10:08 +00:00
ScriptLexer.cpp Handle ":" as a regular token character in linker scripts. 2017-03-09 19:23:00 +00:00
ScriptLexer.h Handle ":" as a regular token character in linker scripts. 2017-03-09 19:23:00 +00:00
ScriptParser.cpp Fix a bug in output section directive. 2017-06-08 19:47:16 +00:00
ScriptParser.h Move the parser for the linker script to a separate file. 2017-04-05 05:07:39 +00:00
Strings.cpp [ELF] - Use llvm::to_integer() instead of StringRef::getAsInteger(). 2017-05-16 08:19:25 +00:00
Strings.h Remove lld toStringRef function. 2017-06-14 20:20:11 +00:00
SymbolTable.cpp [ELF] - Resolve references properly when using .symver directive 2017-06-30 10:19:54 +00:00
SymbolTable.h Remove unused declarations 2017-06-30 00:34:35 +00:00
Symbols.cpp Move copy function from Symbol to SymbolBody. 2017-06-28 19:43:02 +00:00
Symbols.h Move copy function from Symbol to SymbolBody. 2017-06-28 19:43:02 +00:00
SyntheticSections.cpp Add basic 64-bit SPARC support 2017-06-28 17:05:39 +00:00
SyntheticSections.h ELF: Move section merging before ICF. NFCI. 2017-06-12 00:00:51 +00:00
Target.cpp Add basic 64-bit SPARC support 2017-06-28 17:05:39 +00:00
Target.h Add basic 64-bit SPARC support 2017-06-28 17:05:39 +00:00
Threads.h [Support] Move Parallel algorithms from LLD to LLVM. 2017-05-11 00:03:52 +00:00
Thunks.cpp [ELF] Be more precise about Thumb state bit in ARM thunks 2017-06-09 09:51:51 +00:00
Thunks.h [ELF] - Detemplate Thunk creation. 2017-05-17 07:10:59 +00:00
Writer.cpp Fix indentation. 2017-06-28 22:44:11 +00:00
Writer.h Inline a trivial constructor. 2017-05-26 02:17:13 +00:00

README.md

See docs/NewLLD.rst