Import new elf.h.
+2005-08-07 Ulrich Drepper <drepper@redhat.com>
+
+ * ppc_init.c: Add support for new DT_PPC_* and R_PPC_* values.
+ * ppc_symbol.c: Likewise.
+ * libebl_ppc.h: Likewise.
+ * ppc64_init.c: There is now also a dynamic_tag_check functions
+ * ppc64_symbol.c: Add dynamic_tag_check.
+ * libebl_ppc64.h: Add prototype.
+ * alpha_init.c: Add support for new DT_ALPHA_* value.
+ * alpha_symbol.c: Likewise.
+ * libebl_alpha.h: Likewise.
+
2005-08-03 Ulrich Drepper <drepper@redhat.com>
* libebl_alpha.map: Remove unnecessary exports.
eh->name = "Alpha";
eh->reloc_type_name = alpha_reloc_type_name;
eh->reloc_type_check = alpha_reloc_type_check;
+ eh->dynamic_tag_name = alpha_dynamic_tag_name;
+ eh->dynamic_tag_check = alpha_dynamic_tag_check;
eh->copy_reloc_p = alpha_copy_reloc_p;
eh->destr = alpha_destr;
&& reloc_map_table[type] != NULL) ? true : false;
}
+
+const char *
+alpha_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ switch (tag)
+ {
+ case DT_ALPHA_PLTRO:
+ return "ALPHA_PLTRO";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+
+bool
+alpha_dynamic_tag_check (int64_t tag)
+{
+ return tag == DT_ALPHA_PLTRO;
+}
+
+
/* Check whether given relocation is a copy relocation. */
bool
alpha_copy_reloc_p (int reloc)
/* Check relocation type. */
extern bool alpha_reloc_type_check (int type);
+/* Name of dynamic tag. */
+extern const char *alpha_dynamic_tag_name (int64_t tag, char *buf, size_t len);
+
+/* Check dynamic tag. */
+extern bool alpha_dynamic_tag_check (int64_t tag);
+
/* Check whether given relocation is a copy relocation. */
extern bool alpha_copy_reloc_p (int reloc);
extern bool ppc_core_note (const char *name, uint32_t type, uint32_t descsz,
const char *desc);
+/* Name of dynamic tag. */
+extern const char *ppc_dynamic_tag_name (int64_t tag, char *buf, size_t len);
+
+/* Check dynamic tag. */
+extern bool ppc_dynamic_tag_check (int64_t tag);
+
/* Check whether given relocation is a copy relocation. */
extern bool ppc_copy_reloc_p (int reloc);
/* Name of dynamic tag. */
extern const char *ppc64_dynamic_tag_name (int64_t tag, char *buf, size_t len);
+/* Check dynamic tag. */
+extern bool ppc64_dynamic_tag_check (int64_t tag);
+
/* Check whether given relocation is a copy relocation. */
extern bool ppc64_copy_reloc_p (int reloc);
eh->reloc_valid_use = ppc64_reloc_valid_use;
eh->reloc_simple_type = ppc64_reloc_simple_type;
eh->dynamic_tag_name = ppc64_dynamic_tag_name;
+ eh->dynamic_tag_check = ppc64_dynamic_tag_check;
eh->copy_reloc_p = ppc64_copy_reloc_p;
eh->destr = ppc64_destr;
return NULL;
}
+bool
+ppc64_dynamic_tag_check (int64_t tag)
+{
+ return (tag == DT_PPC64_GLINK
+ || tag == DT_PPC64_OPD
+ || tag == DT_PPC64_OPDSZ);
+}
+
+
/* Check whether given relocation is a copy relocation. */
bool
ppc64_copy_reloc_p (int reloc)
eh->reloc_type_check = ppc_reloc_type_check;
eh->reloc_valid_use = ppc_reloc_valid_use;
eh->reloc_simple_type = ppc_reloc_simple_type;
+ eh->dynamic_tag_name = ppc_dynamic_tag_name;
+ eh->dynamic_tag_check = ppc_dynamic_tag_check;
eh->copy_reloc_p = ppc_copy_reloc_p;
eh->destr = ppc_destr;
[R_PPC_GOT_DTPREL16] = { "R_PPC_GOT_DTPREL16", exec },
[R_PPC_GOT_DTPREL16_LO] = { "R_PPC_GOT_DTPREL16_LO", exec },
[R_PPC_GOT_DTPREL16_HI] = { "R_PPC_GOT_DTPREL16_HI", exec },
- [R_PPC_GOT_DTPREL16_HA] = { "R_PPC_GOT_DTPREL16_HA", exec }
+ [R_PPC_GOT_DTPREL16_HA] = { "R_PPC_GOT_DTPREL16_HA", exec },
+ [R_PPC_REL16] = { "R_PPC_REL16", rel },
+ [R_PPC_REL16_LO] = { "R_PPC_REL16_LO", rel },
+ [R_PPC_REL16_HI] = { "R_PPC_REL16_HI", rel },
+ [R_PPC_REL16_HA] = { "R_PPC_REL16_HA", rel },
};
+#define nreloc_map_table \
+ (sizeof (reloc_map_table) / sizeof (reloc_map_table[0]))
/* Determine relocation type string for PPC. */
ppc_reloc_type_name (int type, char *buf __attribute__ ((unused)),
size_t len __attribute__ ((unused)))
{
- if (type < 0 || type >= R_PPC_NUM)
+ if (type < 0 || (size_t) type >= nreloc_map_table)
return NULL;
return reloc_map_table[type].name;
bool
ppc_reloc_type_check (int type)
{
- return (type >= R_PPC_NONE && type < R_PPC_NUM
+ return (type >= R_PPC_NONE && (size_t) type < nreloc_map_table
&& reloc_map_table[type].name != NULL) ? true : false;
}
}
}
+
+const char *
+ppc_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
+ size_t len __attribute__ ((unused)))
+{
+ switch (tag)
+ {
+ case DT_PPC_GOT:
+ return "PPC_GOT";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+
+bool
+ppc_dynamic_tag_check (int64_t tag)
+{
+ return tag == DT_PPC_GOT;
+}
+
+
/* Check whether given relocation is a copy relocation. */
bool
ppc_copy_reloc_p (int reloc)
+2005-08-07 Ulrich Drepper <drepper@redhat.com>
+
+ * elf.h: Update from glibc.
+
2005-08-06 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (AM_CFLAGS): Add -fpic when BUILD_STATIC.
#define LITUSE_ALPHA_TLS_GD 4
#define LITUSE_ALPHA_TLS_LDM 5
+/* Legal values for d_tag of Elf64_Dyn. */
+#define DT_ALPHA_PLTRO (DT_LOPROC + 0)
+#define DT_ALPHA_NUM 1
/* PowerPC specific declarations */
#define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */
#define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */
+/* GNU relocs used in PIC code sequences. */
+#define R_PPC_REL16 249 /* word32 (sym-.) */
+#define R_PPC_REL16_LO 250 /* half16 (sym-.)@l */
+#define R_PPC_REL16_HI 251 /* half16 (sym-.)@h */
+#define R_PPC_REL16_HA 252 /* half16 (sym-.)@ha */
+
/* This is a phony reloc to handle any old fashioned TOC16 references
that may still be in object files. */
#define R_PPC_TOC16 255
+/* PowerPC specific values for the Dyn d_tag field. */
+#define DT_PPC_GOT (DT_LOPROC + 0)
+#define DT_PPC_NUM 1
/* PowerPC64 relocations defined by the ABIs */
#define R_PPC64_NONE R_PPC_NONE
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2005 Red Hat, Inc.
-# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
-#
-# This program is Open Source software; you can redistribute it and/or
-# modify it under the terms of the Open Software License version 1.0 as
-# published by the Open Source Initiative.
-#
-# You should have received a copy of the Open Software License along
-# with this program; if not, you may obtain a copy of the Open Software
-# License version 1.0 from http://www.opensource.org/licenses/osl.php or
-# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
-# 3001 King Ranch Road, Ukiah, CA 95482.
-set -e
-
-export LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
-
-runtest() {
-# Uncomment for debuging
-# echo $1
- ../src/elflint --quiet --gnu-ld $1
-}
-
-runtest ../src/addr2line
-runtest ../src/elfcmp
-runtest ../src/elflint
-runtest ../src/findtextrel
-runtest ../src/ld
-runtest ../src/nm
-runtest ../src/objdump
-runtest ../src/readelf
-runtest ../src/size
-runtest ../src/strip
-runtest ../libelf/libelf.so
-runtest ../libdw/libdw.so
-runtest ../libasm/libasm.so
-runtest ../libebl/libebl_alpha.so
-runtest ../libebl/libebl_arm.so
-runtest ../libebl/libebl_i386.so
-runtest ../libebl/libebl_ia64.so
-runtest ../libebl/libebl_ppc.so
-runtest ../libebl/libebl_ppc64.so
-runtest ../libebl/libebl_sh.so
-runtest ../libebl/libebl_sparc.so
-runtest ../libebl/libebl_x86_64.so
-
-