[PATCH] D52317: Add support for dynamic libraries on Hexagon
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 27 13:49:27 PDT 2018
MaskRay added inline comments.
================
Comment at: test/ELF/hexagon-shared.s:2
+# REQUIRES: hexagon
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %S/Inputs/hexagon-shared.s -o %t2
----------------
Though not strictly required, object files are better suffixed with `.o` and shared objects `.so`
================
Comment at: test/ELF/hexagon-shared.s:5
+# RUN: ld.lld -shared %t2 -o %t3
+# RUN: ld.lld -shared %t %t3 -o %t4
+# RUN: llvm-objdump -d -j .plt %t4 | FileCheck %s
----------------
This test may not be affected but some might (it happened in the past for a few times)
When a `t.so` is used to link `t`. `DT_SONAME` of `t.so` will end up in the `.dynstr` section of `t`. Its length may change the section size sometimes. FileCheck on `t` may get different results on some systems.
For intermediate `%t3` here, it'd be better to specify `-soname t3.so` to fix the length of its `DT_SONAME`.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D52317
More information about the llvm-commits
mailing list