[llvm] r182092 - [PowerPC] Merge/rename PPC fixup types
David Fang
fang at csl.cornell.edu
Fri May 24 09:56:24 PDT 2013
Hi,
>> Your suggestion worked to fix the addresses.
>> The only diff that remains between integrated/non-integrated assembly is:
> [snip]
>> -000000e8 addis r2,r2,ha16(0x188-0xd8)
>> +000000e8 addis r2,r2,ha16(0x188-0xd8+0xb00000)
>
> Hmm. This may be due to another change; applyFixupOffset
> no longer extracts the high part because it now assumes this
> was already done. It looks like this is not true for the
> FixedValue needed with Mach-O relocs ...
>
> Can you try changing this part in RecordScatteredRelocation:
> to:
>
> uint32_t other_half = 0;
> switch (Type) {
> case macho::RIT_PPC_LO16_SECTDIFF:
> other_half = (FixedValue >> 16) & 0xffff;
> + FixedValue = FixedValue & 0xffff;
> break;
> case macho::RIT_PPC_HA16_SECTDIFF:
> other_half = FixedValue & 0xffff;
> + FixedValue = ((FixedValue >> 16) + ((FixedValue & 0x8000) ? 1 : 0)) &
> 0xffff;
> break;
I've re-merged your commit from trunk to branch and applied the above
modification, and again that worked:
g% diff -u hello-printf{-as,}.otooldump
--- hello-printf-as.otooldump 2013-05-23 12:49:14.000000000 -0700
+++ hello-printf.otooldump 2013-05-24 09:51:22.000000000 -0700
@@ -1,4 +1,4 @@
-hello-printf-as.o:
+hello-printf.o:
Indirect symbols for (__TEXT,__picsymbolstub1) 2 entries
address index name
0x00000140 2 ___swbuf
@@ -81,8 +81,8 @@
000000ac lwz r31,0xfffc(r1)
000000b0 mtspr lr,r0
000000b4 blr
-000000b8 nop
-000000bc nop
+000000b8 .long 0x00000000
+000000bc .long 0x00000000
_main:
000000c0 mfspr r0,lr
000000c4 stw r31,0xfffc(r1)
This is the state of things before all the recent PPC updates.
We're back in business! (At least Hello-World is.)
Vielen Dank!
Fang
--
David Fang
http://www.csl.cornell.edu/~fang/
More information about the llvm-commits
mailing list