[PATCH] D25627: [ELF] Allow linker script to use .got and .got.plt sections as inputs

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 00:44:03 PDT 2016


grimar added inline comments.


================
Comment at: ELF/InputSection.h:342
+  typedef typename ELFT::uint uintX_t;
+  typedef typename ELFT::Shdr Elf_Shdr;
+
----------------
Do you need/use this typedefs ?


================
Comment at: test/ELF/linkerscript/output-to-input.s:16
+# RUN:  .got.plt : {} \
+# RUN: }" > %t1.script
+
----------------
Do you really need to specify order of sections to demonstrate output with/without merging of .got/got.plt ?
I mean shouldn't next work ?


```
# RUN: echo "SECTIONS { \
# RUN:  .got : {} \
# RUN:  .got.plt : {} \
# RUN: }" > %t1.script
```

```
# RUN: echo "SECTIONS { \
# RUN:  .got : { *(.got) *(.got.plt)  } \
# RUN: }" > %t2.script
```


================
Comment at: test/ELF/linkerscript/output-to-input.s:42
+
+## Last 16 bytes of .got section should be equal to contents
+## of .got.plt section from previous test.
----------------
Last 32 bytes you mean ? (3 + 1) entries * 8.


Repository:
  rL LLVM

https://reviews.llvm.org/D25627





More information about the llvm-commits mailing list