[PATCH] D21681: [ELF] - Implemented support of default/non-default symbols versions

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 03:50:39 PDT 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

It is possible to create new version of symbol instead of depricated one
using combination of version script and asm commands. For example:

```
__asm__(".symver b_1,b at LIBSAMPLE_1.0");
int b_1() { return 10; }
__asm__(".symver b_2,b@@LIBSAMPLE_2.0");
int b_2() { return 20; }
```

This code makes b_2() to be default implementation for b().
b_1() is used for compatibility with binaries compiled against
library of older version LIBSAMPLE_1.0.

This patch implements support for above functionality in lld.


http://reviews.llvm.org/D21681

Files:
  ELF/SymbolListFile.cpp
  ELF/SymbolTable.cpp
  ELF/Symbols.cpp
  ELF/Symbols.h
  test/ELF/Inputs/verdef-defaultver.s
  test/ELF/verdef-defaultver.s
  test/ELF/verdef-dependency.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21681.61769.patch
Type: text/x-patch
Size: 11045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160624/9a037c1d/attachment.bin>


More information about the llvm-commits mailing list