[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
This commit is contained in:
Ulrich Weigand
2014-07-20 23:15:06 +00:00
parent 160f9b9c10
commit 76fcace66e
7 changed files with 38 additions and 13 deletions
+2 -1
View File
@@ -24,6 +24,7 @@ MCELFObjectTargetWriter::MCELFObjectTargetWriter(bool Is64Bit_,
IsN64(IsN64_){
}
bool MCELFObjectTargetWriter::needsRelocateWithSymbol(unsigned Type) const {
bool MCELFObjectTargetWriter::needsRelocateWithSymbol(const MCSymbolData &SD,
unsigned Type) const {
return false;
}