[PATCH] D68256: ELF: Add .interp synthetic sections first in createSyntheticSections().

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 20:09:19 PDT 2019


MaskRay added a comment.

Looks good. Thanks for catching the issues.



================
Comment at: lld/ELF/Writer.cpp:321
+  if (needsInterpSection()) {
+    for (size_t i = 0; i != partitions.size(); ++i) {
+      InputSection *sec = createInterpSection();
----------------
`i = 1; i <= partitions.size(); ++i` to use `i` instead of `i + 1` below.


================
Comment at: lld/test/ELF/dynamic-linker.s:7
 # RUN: ld.lld --dynamic-linker foo %t.o %t.so -o %t
-# RUN: llvm-readelf -program-headers %t | FileCheck %s
+# RUN: llvm-readelf -program-headers -section-headers %t | FileCheck %s
 
----------------
While here, use double-dash form for llvm-readelf: `--program-headers --section-headers`


================
Comment at: lld/test/ELF/partition-dynamic-linker.s:9
+# RUN: ld.lld -shared --gc-sections --dynamic-linker foo %t.o %t.so -o %t
+# RUN: llvm-readelf -section-headers %t | FileCheck %s
+
----------------
--section-headers


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68256





More information about the llvm-commits mailing list