From c0a2d0b7edacbc6389574821b0231e07431dabb6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 5 Feb 2016 21:07:40 +0100 Subject: frv: resurrect port somehow, totally untested The FR-V port is really broken, and I have no emulator or hardware for this platform. I tried to get some hardware from RedHat, who made the FR-V port initially. Unfortunately Fujitsi didn't agreed to sent me some of their unused spare hardware lying @RedHat. As I invested some time to get stuff compiled, I decided to add the code and may be anytime later I can gain access to some emulator or hardware. GDB simulator for FR-V doesn't support booting Linux AFAIK. --- libc/sysdeps/linux/frv/crtreloc.c | 50 ++++----------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) (limited to 'libc/sysdeps/linux/frv/crtreloc.c') diff --git a/libc/sysdeps/linux/frv/crtreloc.c b/libc/sysdeps/linux/frv/crtreloc.c index cd07170a8..b1d542395 100644 --- a/libc/sysdeps/linux/frv/crtreloc.c +++ b/libc/sysdeps/linux/frv/crtreloc.c @@ -25,6 +25,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ +#ifdef __FRV_FDPIC__ + #include #include @@ -61,7 +63,7 @@ reloc_range_indirect (void ***p, void ***e, /* Call __reloc_range_indirect for the given range except for the last entry, whose contents are only relocated. It's expected to hold the GOT value. */ -void* attribute_hidden +attribute_hidden void* __self_reloc (const struct elf32_fdpic_loadmap *map, void ***p, void ***e) { @@ -72,48 +74,4 @@ __self_reloc (const struct elf32_fdpic_loadmap *map, return __reloc_pointer (*p, map); } - -#if 0 -/* These are other functions that might be useful, but that we don't - need. */ - -/* Remap pointers in [p,e). */ -static __always_inline void** -reloc_range (void **p, void **e, - const struct elf32_fdpic_loadmap *map) -{ - while (p < e) - { - *p = __reloc_pointer (*p, map); - p++; - } - return p; -} - -/* Remap p, adjust e by the same offset, then map the pointers in the - range determined by them. */ -void attribute_hidden -__reloc_range (const struct elf32_fdpic_loadmap *map, - void **p, void **e) -{ - void **old = p; - - p = __reloc_pointer (p, map); - e += p - old; - reloc_range (p, e, map); -} - -/* Remap p, adjust e by the same offset, then map pointers referenced - by the (unadjusted) pointers in the range. Return the relocated - value of the last pointer in the range. */ -void* attribute_hidden -__reloc_range_indirect (const struct elf32_fdpic_loadmap *map, - void ***p, void ***e) -{ - void ***old = p; - - p = __reloc_pointer (p, map); - e += p - old; - return reloc_range_indirect (p, e, map); -} -#endif +#endif /* __FRV_FDPIC__ */ -- cgit v1.2.3