[PATCH] D41105: [ELF] Fix placement of a sentinel entry in the .ARM.exidx section.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 13:56:05 PST 2017
Igor Kudrin via Phabricator <reviews at reviews.llvm.org> writes:
> + // Find the last existing InputSectionDescription.
> + // Add a new only if we cannot find one.
> + // As a result, if we have a description for an output section like
> + // .foo : { *(.foo) bar = . }
> + // we will place the new section before the assignment so that it will
> + // affect the value of 'bar', which is, probably, expected.
> + // We also had a crash in the similar situation with an .ARM.exidx sentinel,
> + // because 'ARMExidxSentinelSection::writeTo()' expected it to be placed
> + // into a non-empty bucket.
I would actually find the result surprising in the general case.
I think we can just make the exidx code more resilient. Instead of
having a special handling in writeTo, could we push a relocation to the
Relocations vector of the sentinel entry?
Cheers,
Rafael
More information about the llvm-commits
mailing list