The CIE pointer field of an FDE record contains an offset to a corresponding CIE record. In object files, this value comes with relocation because the value has to be fixed when a linker combines the final section from multiple sources. In most object files there is only one CIE record at offset 0 of the .debug_frame section, so reading a relocated or a raw value makes no difference. However, in partially linked object files there are multiple CIE records and the relocations should be applied to recover the right offset value.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/test/DebugInfo/debug-frame-cieid-reloc.test | ||
---|---|---|
1 ↗ | (On Diff #244655) | As this is testing the CIE_pointer field of FDEs, it's porbably best to rename the test to debug-frame-cie-pointer-reloc.test. |
7 ↗ | (On Diff #244655) | Add a comma after "reference" |
18–21 ↗ | (On Diff #244655) | I'm guessing you used obj2yaml to generate this file? It generates excessive whitespace between keys and values, which I find can make it harder to read, and would prefer be removed to make something like this: FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_X86_64 Same goes further below. |
25 ↗ | (On Diff #244655) | No need for the AddressAlign field. Delete it. |
29–31 ↗ | (On Diff #244655) | No need for these three fields. |
40 ↗ | (On Diff #244655) | Does Addend allow a hex number? If so, I feel like 0x28 would be clearer, as it matches the value in the output. |