[PATCH] D25627: [ELF] Convert linker generated sections to input sections

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 10:26:36 PDT 2016


peter.smith added a comment.

Apologies in advance if I'm missing something, but I'm not completely sure why we need a special SyntheticInputSection?
Is it because we want to retain a similar custom interface to make generating the Section easier, while still allowing it to be placed as an InputSection? Or is it to get around the lack of an InputFile for the SyntheticInputSection? If it is the latter I would have thought a single SyntheticInputFile might be less disruptive.

Another possible use case of linker generated InputSections is Thunks (or other linker generated code sequences/data) as InputSections, which would need to be mixed in with other InputSections from the file. Would this be possible with SyntheticInputSections?

As an aside for ARM PLT and GOT sections:

I've not got a good reason for why ARM only uses a single .got section on ld.bfd and gold. A best guess is that ARM also had to support Symbian OS at the time which only had a single .got section. At the time of doing the initial ARM port I thought about making a single .got section to match gold and ld.bfd, but given the tests I've been running against ld-linux-armhf.so.3 haven't caused a problem I didn't think it worth the additional disruption to the code-base. Is there a widespread use case where this doesn't work?


https://reviews.llvm.org/D25627





More information about the llvm-commits mailing list