[PATCH] D128382: [LLD] Two tweaks to symbol ordering scheme

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 14:53:09 PDT 2022


smeenai added a comment.

I assume the purpose of the test was to check specifically for the old behavior, so we should still have a part of the test that checks for that. Maybe we could use a linker script or a large `.space` directive to simulate a large text section? https://reviews.llvm.org/source/llvm-github/browse/main/lld/test/ELF/arm-thunk-edgecase.s is an example of using a linker script for such a purpose.

Come to think of it, I'm not sure if the size check will handle sections placed by linker script correctly, but I'm not sure how the old logic was handling that either.



================
Comment at: lld/ELF/Writer.cpp:1336
 
   // Find an insertion point for the ordered section list in the unordered
   // section list. On targets with limited-range branches, this is the mid-point
----------------
This comment should probably be updated a bit to reflect the new conditional.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128382/new/

https://reviews.llvm.org/D128382



More information about the llvm-commits mailing list