summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/frv/crtreloc.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-02-05 21:07:40 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-02-07 18:23:22 +0100
commitc0a2d0b7edacbc6389574821b0231e07431dabb6 (patch)
treef2d21c6e2fe8f99ccd820d1d406dc5d51419ba77 /libc/sysdeps/linux/frv/crtreloc.c
parentb499fe614ac5b492fc0fdc6e1fbbeeb904674159 (diff)
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.
Diffstat (limited to 'libc/sysdeps/linux/frv/crtreloc.c')
-rw-r--r--libc/sysdeps/linux/frv/crtreloc.c50
1 files changed, 4 insertions, 46 deletions
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 <http://www.gnu.org/licenses/>. */
+#ifdef __FRV_FDPIC__
+
#include <sys/types.h>
#include <link.h>
@@ -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__ */