HomePhabricator

Change how we apply relocations.

Authored by rafael on Apr 12 2016, 6:40 PM.

Description

Change how we apply relocations.

With this patch we use the first scan over the relocations to remember
the information we found about them: will them be relaxed, will a plt be
used, etc.

With that the actual relocation application becomes much simpler. That
is particularly true for the interfaces in Target.h.

This unfortunately means that we now do two passes over relocations for
non SHF_ALLOC sections. I think this can be solved by factoring out the
code that scans a single relocation. It can then be used both as a scan
that record info and for a dedicated direct relocation of non SHF_ALLOC
sections.

I also think it is possible to reduce the number of enum values by
representing a target with just an OutputSection and an offset (which
can be from the start or end).

This should unblock adding features like relocation optimizations.

llvm-svn: 266158

Details

Committed
rafaelApr 12 2016, 6:40 PM
Parents
rGb2d2a018d638: [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.
Branches
Unknown
Tags
Unknown