[PATCH] D55817: [ELF][ARM] Process ARM build attributes of dynamic libraries.

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 04:02:34 PST 2018


peter.smith added a comment.

I have several reservations about doing this:

- BuildAttributes are only defined for relocatable object files, the ABI does not require or prevent them from appearing in Shared Objects or Executables therefore nothing should rely on their presence.
- Can it be guaranteed that the shared object we link against will have the same attributes as the shared object at run time?
- Should the attributes of the shared object be aggregated with the attributes from the relocatable object?

This is all outside of the specification http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf BuildAttributes are only defined for relocatable objects see (2.1.3 The scope of build attributes). Granted there is nothing stopping LLD defining its own behaviour on top of the specification but I think we should be very careful doing so. Given that we can't guarantee what we are linking against dynamically I'm definitely against updating the attributes of the ELF file based on Shared Objects, at least not without proposing a change to the ABI. There may be a case for a warning for certain specific clashes, but I don't think we should do this in the general case.

I'm out of the office till next year so I can't give many more comments on this. There is a mailing list for the Arm ABI arm.eabi at arm.com that you can ask further questions on what BuildAttributes should be used for.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D55817





More information about the llvm-commits mailing list