summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2007-11-22 19:27:42 +0000
committerBernd Schmidt <bernds_cb1@t-online.de>2007-11-22 19:27:42 +0000
commitd10b4f574d28ec8e679a62f491d45a7820042273 (patch)
treebd1862dca45dabb5c29ae08c450c8cd7d2ab70c2 /libc/sysdeps/linux
parentc5b7f28ab5791bd321a63b4a56ea5199fe2d9615 (diff)
Ignore entries of "-1" in rofixup; the linker sometimes has no choice but to
create these for deleted entries in .eh_frame.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/bfin/crtreloc.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/libc/sysdeps/linux/bfin/crtreloc.c b/libc/sysdeps/linux/bfin/crtreloc.c
index afc9504ce..4c09f904f 100644
--- a/libc/sysdeps/linux/bfin/crtreloc.c
+++ b/libc/sysdeps/linux/bfin/crtreloc.c
@@ -47,32 +47,35 @@ reloc_range_indirect (void ***p, void ***e,
{
while (p < e)
{
- void *ptr = __reloc_pointer (*p, map);
- if (ptr)
+ if (*p != (void **)-1)
{
- void *pt;
- if ((long)ptr & 3)
+ void *ptr = __reloc_pointer (*p, map);
+ if (ptr != (void *)-1)
{
- unsigned char *c = ptr;
- int i;
- unsigned long v = 0;
- for (i = 0; i < 4; i++)
- v |= c[i] << 8 * i;
- pt = (void *)v;
+ void *pt;
+ if ((long)ptr & 3)
+ {
+ unsigned char *c = ptr;
+ int i;
+ unsigned long v = 0;
+ for (i = 0; i < 4; i++)
+ v |= c[i] << 8 * i;
+ pt = (void *)v;
+ }
+ else
+ pt = *(void**)ptr;
+ pt = __reloc_pointer (pt, map);
+ if ((long)ptr & 3)
+ {
+ unsigned char *c = ptr;
+ int i;
+ unsigned long v = (unsigned long)pt;
+ for (i = 0; i < 4; i++, v >>= 8)
+ c[i] = v;
+ }
+ else
+ *(void**)ptr = pt;
}
- else
- pt = *(void**)ptr;
- pt = __reloc_pointer (pt, map);
- if ((long)ptr & 3)
- {
- unsigned char *c = ptr;
- int i;
- unsigned long v = (unsigned long)pt;
- for (i = 0; i < 4; i++, v >>= 8)
- c[i] = v;
- }
- else
- *(void**)ptr = pt;
}
p++;
}