[PATCH] D21598: Fix a bug that MIPS thunks can overwrite other section contents.

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 03:11:58 PDT 2016


peter.smith added a comment.

Given that this is effectively a reversion, I won't comment on the specifics as I'm sure there will be another attempt made building from the original base.

Separating the offset updates does make it easier to implement interworking thunks as it does give the freedom to add thunks to any InputSection so I'm in favour of making the change.

It is definitely a good idea to add the test in the opposite order.

In the longer term I think that it would be a good idea to work towards a separation of:

- Linker added content that does not require an address to know if it is needed and where it needs to be generated (interworking thunks and PLT entries). Only a single pass through relocations is needed.
- Linker added content that requires an address to know if it is needed and where it needs to be generated (range extension thunks). We don't have any of these implemented now.
- Operations that are either non-idempotent or expensive to update that need final addresses, but don't alter the sizes of any section.


http://reviews.llvm.org/D21598





More information about the llvm-commits mailing list