[PATCH] D66749: [ELF][ARM] Allow PT_LOAD to have overlapping p_offset ranges on EM_ARM

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 02:00:10 PDT 2019


grimar added a comment.

It feels can be splitted into NFC commit(s) + the actual change.

For example in many places you removed `--hash-style=sysv`,
renamed the output (e.g. arm-thumb-plt-reloc.s). Sometimes you added
`-soname` or merged `llvm-objdump` calls (arm-thumb-thunk-empty-pass.s).
Or you changed `llvm-objdump`->`llvm-readelf`. (arm-pie-relative.s)
Or just removed something tested by `llvm-readelf` (arm-execute-only.s).

Seems it would be much easier to read if you make unnecessary improvements/cleanups
you want to do in a separate NFC commit. What do you think?



================
Comment at: ELF/Writer.cpp:2232
+                    config->emachine == EM_ARM || config->emachine == EM_PPC ||
+                    config->emachine == EM_PPC64;
 
----------------
This became large. I am not sure, but does it make sense to invert the condition?

I.e:

```
bool disabled = ....;
```


================
Comment at: test/ELF/arm-fpic-got.s:63
 // CODE: $d.1:
-// 0x11004 + 0x0ff4 + 8 = 0x12000 = .got
-// CODE-NEXT:   11010:  f4 0f 00 00
+// 0x11124 + 0x1008 + 8 = 0x12134 = .got
+// CODE-NEXT:   11124:       08 10 00 00
----------------
`0x12134` is not `.got` address, `.got` is at `0x12128`


================
Comment at: test/ELF/arm-tls-ldm32.s:7
+// RUN: ld.lld %t.o -o %t
+// RUN: llvm-objdump -d -triple=armv7a-linux-gnueabi %t | FileCheck --check-prefix=CHECK-EXE %s
 
----------------
This seems to be unrelative fix/improvement.


================
Comment at: test/ELF/arm-tls-ldm32.s:65
 
-// (0x204c - 0x1004) + (0x1004 - 0x1000 - 8) = 0x1044
-// CHECK:      1004:       44 10 00 00
-// CHECK-NEXT: 1008:       00 00 00 00
-// CHECK-NEXT: 100c:       04 00 00 00
+// (0x204c - 0x11c4) + (0x11c4 - 0x11c0 - 8) = 0x2214
+// CHECK:      11c4:       5c 10 00 00
----------------
This one should be:
(0x2224 - 0x11c4) + (0x11c4 - 0x11c0 - 8) = 0x105C


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D66749





More information about the llvm-commits mailing list