Handle --prefix-alloc-sections after --rename-sections so that --prefix-alloc-sections code
does not have to check if renaming has been performed.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 37486 Build 37485: arc lint + arc unit
Event Timeline
I agree that this code is simpler, but I'm slightly hesitant you might have impaired performance of the loop, since we now have to loop over all sections twice when using both --prefix-alloc-sections and --rename-sections switches. Admittedly, I suspect this is a rare case (I still don't know of a reasonable use-case for --prefix-alloc-sections), so maybe it's not worth worrying about. @rupprecht, I think you had some performance issues with llvm-objcopy in the past. Do you have any insight into whether my concern is justified? If not, LGTM.
PR41266 was filed for https://github.com/ClangBuiltLinux/linux/blob/master/drivers/firmware/efi/libstub/Makefile#L75
The performance should not matter.
LGTM, if @rupprecht is happy (or he doesn't get back in a reasonable amount of time).