[MC] Pass MCSymbolData to needsRelocateWithSymbol
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Sun, 20 Jul 2014 23:15:06 +0000 (23:15 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Sun, 20 Jul 2014 23:15:06 +0000 (23:15 +0000)
commit76fcace66e918791d00c898d38fea0b44d972aa0
tree01f57044f0fef47f76c81e0d5cf761c0dbed6842
parent160f9b9c100d05ddf4e7f369b01764b5fe295909
[MC] Pass MCSymbolData to needsRelocateWithSymbol

As discussed in a previous checking to support the .localentry
directive on PowerPC, we need to inspect the actual target symbol
in needsRelocateWithSymbol to make the appropriate decision based
on that symbol's st_other bits.

Currently, needsRelocateWithSymbol does not get the target symbol.
However, it is directly available to its sole caller.  This patch
therefore simply extends the needsRelocateWithSymbol by a new
parameter "const MCSymbolData &SD", passes in the target symbol,
and updates all derived implementations.

In particular, in the PowerPC implementation, this patch removes
the FIXME added by the previous checkin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213487 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCELFObjectWriter.h
lib/MC/ELFObjectWriter.cpp
lib/MC/MCELFObjectTargetWriter.cpp
lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
test/MC/PowerPC/ppc64-localentry.s