[PATCH] D59436: [ELF] Fix missing ELF st_other field on versioned symbols

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 10:09:26 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360442: [MC][ELF] Copy top 3 bits of st_other to .symver aliases (authored by MaskRay, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59436?vs=198513&id=199032#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59436/new/

https://reviews.llvm.org/D59436

Files:
  llvm/trunk/lib/MC/ELFObjectWriter.cpp
  llvm/trunk/test/MC/PowerPC/ppc64-localentry-symver.s


Index: llvm/trunk/lib/MC/ELFObjectWriter.cpp
===================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp
@@ -1279,6 +1279,7 @@
     // This is the first place we are able to copy this information.
     Alias->setExternal(Symbol.isExternal());
     Alias->setBinding(Symbol.getBinding());
+    Alias->setOther(Symbol.getOther());
 
     if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
       continue;
Index: llvm/trunk/test/MC/PowerPC/ppc64-localentry-symver.s
===================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-localentry-symver.s
+++ llvm/trunk/test/MC/PowerPC/ppc64-localentry-symver.s
@@ -0,0 +1,17 @@
+# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-freebsd13.0 %s -o %t
+# RUN: llvm-objdump -t %t | FileCheck %s
+
+# CHECK: 0000000000000000 gw    F .text  00000000 0x60 __impl_foo
+# CHECK: 0000000000000000 g     F .text  00000000 0x60 foo
+# CHECK: 0000000000000000 gw    F .text  00000000 0x60 foo at FBSD_1.1
+
+.globl foo
+.type foo, at function
+foo:
+  nop
+  nop
+  .localentry foo, 8
+
+.symver __impl_foo, foo at FBSD_1.1
+.weak   __impl_foo
+.set    __impl_foo, foo


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59436.199032.patch
Type: text/x-patch
Size: 1233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190510/735e5180/attachment.bin>


More information about the llvm-commits mailing list