summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-06-20 05:39:04 +0000
committerEric Andersen <andersen@codepoet.org>2004-06-20 05:39:04 +0000
commit4a296e9ef1ae818641d83172b71e1c62a3467c9e (patch)
treeb877bdf0c3bb84d177c44986f5cfe830fd3a888f
parent7503ff855821be5c37edfeac6464b310ce32ddec (diff)
Whine about R_PPC_REL24 relocations, and tell people to compile
shared libraries with -fPIC
-rw-r--r--ldso/ldso/powerpc/elfinterp.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index 13a8be9ba..e67128b2a 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -349,17 +349,22 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
*(short *)reloc_addr = finaladdr;
break;
case R_PPC_REL24:
- {
- Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
- if(unlikely(delta<<6>>6 != delta)) {
- _dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
- "Compile shared libraries with -fPIC!\n",
- _dl_progname, symname);
- _dl_exit(1);
+#if 0
+ {
+ Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
+ if(unlikely(delta<<6>>6 != delta)) {
+ _dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
+ "Compile shared libraries with -fPIC!\n",
+ _dl_progname, symname);
+ _dl_exit(1);
+ }
+ *reloc_addr = (*reloc_addr & 0xfc000003) | (delta & 0x3fffffc);
+ break;
}
- *reloc_addr = (*reloc_addr & 0xfc000003) | (delta & 0x3fffffc);
- break;
- }
+#else
+ _dl_dprintf(2,"R_PPC_REL24: Compile shared libraries with -fPIC!\n");
+ _dl_exit(1);
+#endif
default:
_dl_dprintf(2, "%s: can't handle reloc type ", _dl_progname);
#if defined (__SUPPORT_LD_DEBUG__)