Define RelType to represent relocation types.
Audit RequiredrL315525

Description

Define RelType to represent relocation types.

We were using uint32_t as the type of relocation kind. It has a
readability issue because what Type really means in uint32_t Type
is not obvious. It could be a section type, a symbol type or a
relocation type.

Since we do not do any arithemetic operations on relocation types
(e.g. adding one to R_X86_64_PC32 doesn't make sense), it would be
more natural if they are represented as enums. Unfortunately, that
is not doable because relocation type definitions are spread into
multiple header files.

So I decided to use typedef. This still should be better than the
plain uint32_t because the intended type is now obvious.

Details

Auditors
Bigcheese
Committed
ruiuOct 11 2017, 3:49 PM
Parents
rL315524: Add cases for new type DependentAddressSpace, added in r314649
Branches
Unknown
Tags
Unknown