Like rLLD354040.
Previously, for unrecognized relocation types, in -no-pie/-pie mode, we got something like:
foo.o: unrecognized relocation ...
In -shared mode:
error: can't create dynamic relocation ... against symbol: yyy in readonly segment
Differential D66277
[ELF][AArch64] Improve error message for unknown relocations MaskRay on Aug 14 2019, 10:40 PM. Authored by
Details Like rLLD354040. Previously, for unrecognized relocation types, in -no-pie/-pie mode, we got something like: foo.o: unrecognized relocation ... In -shared mode: error: can't create dynamic relocation ... against symbol: yyy in readonly segment
Diff Detail
Event TimelineComment Actions How about adding a test case? See test\ELF\invalid\invalid-relocation-x64.test for example. Comment Actions Looks good to me. George's suggestion for a test is a good one. From a brief look some of the other targets also return R_ABS by default from getRelExpr, such as ARM, PPC, PPC64, Hexagon, MSP430, AVR. I don't think it is worth applying this method universally to all of them, but it may be worth ARM, PPC and PPC64. When this goes in I'd be happy to submit a similar patch for ARM. Comment Actions Clarify. error: can't create dynamic relocation ... against symbol: was in -shared mode |