llvm-project/llvm/test/LTO/X86
Fangrui Song 38426c114f [MC] Don't emit .symver redirected symbols to the symbol table
GNU as keeps the original symbol in the symbol table for defined @ and
@@, but suppresses it in other cases (@@@ or undefined). The original
symbol is usually undesired:
In a shared object, the original symbol can be localized with a version
script, but it is hard to remove/localize in an archive:

1) a post-processing step removes the undesired original symbol
2) consumers (executable) of the archive are built with the
   version script

Moreover, it can cause linker issues like binutils PR/18703 if the
original symbol name and the base name of the versioned symbol is the
same (both ld.bfd and gold have some code to work around defined @ and
@@). In lld, if it sees f and f@v1:

  --version-script =(printf 'v1 {};') => f and f@v1
  --version-script =(printf 'v1 { f; };') => f@v1 and f@@v1

It can be argued that @@@ added on 2000-11-13 corrected the @ and @@ mistake.

This patch catches some more multiple version errors (defined @ and @@),
and consistently suppress the original symbol. This addresses all the
problems listed above.

If the user wants other aliases to the versioned symbol, they can copy
the original symbol to other symbol names with .set directive, e.g.

    .symver f, f@v1  # emit f@v1 but not f into .symtab
    .set f_impl, f   # emit f_impl into .symtab

llvm-svn: 369233
2019-08-19 06:17:30 +00:00
..
Inputs [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63 2019-07-11 01:14:30 +00:00
attrs.ll
bcsection.ll
cfi_endproc.ll
codemodel-1.ll
codemodel-2.ll
codemodel-3.ll
current-section.ll
diagnostic-handler-noexit.ll
diagnostic-handler-remarks-with-hotness.ll Revert [InlineCost] cleanup calculations of Cost and Threshold 2019-07-03 04:01:51 +00:00
diagnostic-handler-remarks.ll Revert [InlineCost] cleanup calculations of Cost and Threshold 2019-07-03 04:01:51 +00:00
disable-verify.ll
dllimport.ll
internalize.ll
invalid.ll [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63 2019-07-11 01:14:30 +00:00
keep-used-puts-during-instcombine.ll
libcall-overridden-via-alias.ll
linkonce_odr_func.ll
list-dependent-libraries.ll [ThinLTO]LTO]Legacy] Fix dependent libraries support by adding querying of the IRSymtab 2019-06-12 11:07:56 +00:00
list-symbols.ll
lit.local.cfg
llvm-lto-output.ll
no-undefined-puts-when-implemented.ll
objc-detection-i386.ll
objc-detection.ll
parallel.ll
pr25919.ll
pr38046.ll
private-symbol.ll
remangle_intrinsics.ll
remangle_intrinsics_tbaa.ll
restore-externals.ll
runtime-library.ll [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests 2019-04-27 16:12:14 +00:00
set-merged.ll
stdcall.ll
strip-debug-info-no-call-loc.ll
strip-debug-info.ll
symver-asm.ll [MC] Don't emit .symver redirected symbols to the symbol table 2019-08-19 06:17:30 +00:00
symver-asm2.ll [MC] Don't emit .symver redirected symbols to the symbol table 2019-08-19 06:17:30 +00:00
symver-asm3.ll
tailcallelim.ll Resubmit r356511 "[TailCallElim] Add tailcall elimination pass to LTO pipelines" 2019-03-20 19:08:18 +00:00
triple-init.ll
triple-init2.ll
type-mapping-bug.ll
type-mapping-bug2.ll
unnamed.ll