summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-06 16:11:43 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-06 16:11:43 +0000
commit4efa075cf3b7d772bcb1b82d175dd6ddb0cd29c5 (patch)
tree30f2047dbed293d4b7d25aa2f15a93aa01800a93 /ldso
parentdf1496fd55deb8df8a1f5d8534854190dfa75a3b (diff)
Joakim Tjernlund writes:
This patch makes -fpic work for PCC and optimzes the relcation by moving the cache flushing stuff to JMP relocs only. Actually PPCs ldso can only handle small GOT tables(<=8192 entries)anyhow, so it makes little sense to compile PPC with -fPIC. libuClibc shrunk from 340724 to 330780 bytes with -fpic.
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/powerpc/dl-startup.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h
index 5d8073ccf..f8e14e0ba 100644
--- a/ldso/ldso/powerpc/dl-startup.h
+++ b/ldso/ldso/powerpc/dl-startup.h
@@ -38,15 +38,15 @@ asm("" \
Elf32_Addr finaladdr=(SYMBOL)+(RELP)->r_addend;\
if (type==R_PPC_RELATIVE) { \
*REL=(Elf32_Word)(LOAD)+(RELP)->r_addend;\
+ } else if (type==R_PPC_ADDR32 || type==R_PPC_GLOB_DAT) {\
+ *REL=finaladdr; \
} else if (type==R_PPC_JMP_SLOT) { \
Elf32_Sword delta=finaladdr-(Elf32_Word)(REL);\
*REL=OPCODE_B(delta); \
- } else if (type==R_PPC_ADDR32) { \
- *REL=finaladdr; \
+ PPC_DCBST(REL); PPC_SYNC; PPC_ICBI(REL);\
} else { \
- _dl_exit(100+ELF32_R_TYPE((RELP)->r_info)); \
+ _dl_exit(100+ELF32_R_TYPE((RELP)->r_info));\
} \
- PPC_DCBST(REL); PPC_SYNC; PPC_ICBI(REL); \
}
/*
* Transfer control to the user's application, once the dynamic loader