[PATCH] D63132: [ELF][RISCV] Set st_shndx of __global_pointer$ to 1 if .sdata does not exist

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 06:53:31 PDT 2019


jrtc27 requested changes to this revision.
jrtc27 added a comment.
This revision now requires changes to proceed.

GNU ld treats it as undefined:

  10: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __global_pointer$



================
Comment at: test/ELF/riscv-gp.s:14
+
+# SYM0: {{0*}}00000800 0 NOTYPE LOCAL HIDDEN 1 __global_pointer$
+
----------------
Should be GLOBAL DEFAULT to match GNU ld.


================
Comment at: test/ELF/riscv-gp.s:32
+# SEC: [ 7] .sdata PROGBITS {{0*}}00003000
+# SYM: {{0*}}00003800 0 NOTYPE LOCAL HIDDEN 7 __global_pointer$
+
----------------
GLOBAL DEFAULT again.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D63132





More information about the llvm-commits mailing list