This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Assign SHF_INFO_LINK flag to REL[A] sections.
ClosedPublic

Authored by grimar on Jun 1 2017, 2:02 AM.

Details

Summary

Spec says: (http://www.sco.com/developers/gabi/latest/ch4.sheader.html)

sh_info
This member holds extra information, whose interpretation depends on the section type. A table below describes the values.
If the sh_flags field for this section header includes the attribute SHF_INFO_LINK, then this member represents a section header table index.

SHF_INFO_LINK
The sh_info field of this section header holds a section header table index.

Since sh_info for SHT_REL[A] sections should contain the section header index of the section to which the relocation applies, this is
consistent with spec to put this flag. Behavior matches both bfd and gold as well.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Jun 1 2017, 2:02 AM
This revision was automatically updated to reflect the committed changes.