[PATCH] D58960: [llvm-objcopy] - Fix --compress-debug-sections when there are relocations.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 07:04:26 PST 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: test/tools/llvm-objcopy/ELF/Inputs/compress-debug-sections.yaml:20
         Symbol:          .debug_foo
         Type:            R_X86_64_32
+      - Offset:          0x2
----------------
I thought about adding one more section .debug_bar and do something like:
```
      - Offset:          0x3
        Symbol:          .debug_bar
        Type:            R_X86_64_32
```

i.e. to show that if relocation section `.rela.X` has target `X` and relocation that references Y,
where `X` and `Y` are replaced debug section then we handle it correctly.

But I am not sure it worth doing that actually since the existent test covers the all code
added I think. I.e. it tests that if relocation section `.rela.X` has target `X` and relocation that references X,
where `X` is a replaced debug section then we handle it correctly.
Since both the code pieces that fixes section target and relocations themselves are different and both used,
maybe it is already enough here.




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

https://reviews.llvm.org/D58960





More information about the llvm-commits mailing list