1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-22 02:20:51 +03:00

Do not emit .interp for DSO

This commit is contained in:
Rui Ueyama 2021-03-05 13:57:00 +09:00
parent e8b1318255
commit 41f8cba844
2 changed files with 3 additions and 2 deletions

View File

@ -877,7 +877,8 @@ int main(int argc, char **argv) {
out::gnu_hash = new GnuHashSection;
if (!config.is_static) {
out::interp = new InterpSection;
if (!config.shared)
out::interp = new InterpSection;
out::dynamic = new DynamicSection;
out::reldyn = new RelDynSection;
out::versym = new VersymSection;

View File

@ -17,7 +17,7 @@ clang -shared -fuse-ld=`pwd`/../mold -o $t/b.so $t/a.o
readelf --dyn-syms $t/b.so > $t/log
grep -q '0000000000000000 0 NOTYPE GLOBAL DEFAULT UND fn2' $t/log
grep -q '000000000000111c 0 NOTYPE GLOBAL DEFAULT 17 fn1' $t/log
grep -q '000000000000111c 0 NOTYPE GLOBAL DEFAULT 16 fn1' $t/log
cat <<EOF | clang -fPIC -c -o $t/c.o -xc -
#include <stdio.h>