]> granicus.if.org Git - llvm/commit
[ELF][MC] Set types of aliases of IFunc to STT_GNU_IFUNC
authorFangrui Song <maskray@google.com>
Sat, 7 Sep 2019 14:58:47 +0000 (14:58 +0000)
committerFangrui Song <maskray@google.com>
Sat, 7 Sep 2019 14:58:47 +0000 (14:58 +0000)
commit69774a3a96d97606c7df82b71ecade3e1cfe1190
tree4bdce9a35f40c44aca78a8298b5b50aee574b223
parent074c881b669f40ff3580528d54db1a100390b544
[ELF][MC] Set types of aliases of IFunc to STT_GNU_IFUNC

```
.type  foo,@gnu_indirect_function
.set   foo,foo_resolver

.set foo2,foo
.set foo3,foo2
```

The types of foo2 and foo3 should be STT_GNU_IFUNC, but we currently
resolve them to the type of foo_resolver. This patch fixes it.

Differential Revision: https://reviews.llvm.org/D67206
Patch by Senran Zhang

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371312 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/ELFObjectWriter.cpp
test/MC/ELF/ifunc-alias.s [new file with mode: 0644]