[PATCH] D41234: [ELF] Fix placement of a sentinel entry in the .ARM.exidx section.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 02:25:33 PST 2017


ikudrin updated this revision to Diff 127311.
ikudrin added a comment.

Thanks for the comments!

- Rebased on the top to embrace changes to deduplicate entries.
- Implemented method {{empty()}} to remove a sentinel if there are no other entries.
- Added a test to check that a sentinel is not removed by deduplication.

>>   }
>> 
>> +    if (Sections.empty())
>>  +      continue;
> 
> This is never true because of the sentinel, no?

I still have similar checks as a precaution for malicious linker scripts. See {{arm-data-prel.s}} as the example.


https://reviews.llvm.org/D41234

Files:
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Writer.cpp
  test/ELF/arm-exidx-dedup-and-sentinel.s
  test/ELF/linkerscript/arm-exidx-sentinel-and-assignment.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41234.127311.patch
Type: text/x-patch
Size: 10849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171218/7e2b41f9/attachment.bin>


More information about the llvm-commits mailing list