[PATCH] D15965: Add support for dumping relocations in non-relocatable files

Colin LeMahieu via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 11:33:20 PDT 2016

colinl added a comment.

> The assert is correct. Whatever is calling getRelocationOffset should

>  instead be trying to get the address.

I disagree, the assertion isn't correct.

You can ask for a relocation's offset inside an exe and SO file.  r_offset is overloaded to contain the address in these which is why section offset needs to be subtracted in order to get the offset.

I'm not looking for the address, I'm looking for precisely the relocation offset.



More information about the llvm-commits mailing list