Page MenuHomeFreeBSD

D22403.id64507.diff
No OneTemporary

D22403.id64507.diff

Index: cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
===================================================================
--- cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
+++ cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
@@ -682,6 +682,9 @@
#elif defined(__mips__)
elf_file.ehdr.e_machine = EM_MIPS;
#elif defined(__powerpc64__)
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+ elf_file.ehdr.e_flags = 2;
+#endif
elf_file.ehdr.e_machine = EM_PPC64;
#elif defined(__sparc)
elf_file.ehdr.e_machine = EM_SPARCV9;
@@ -1198,7 +1201,7 @@
static const char dt_symfmt[] = "%s%ld.%s";
static const char dt_weaksymfmt[] = "%s.%s";
char probename[DTRACE_NAMELEN];
- int fd, i, ndx, eprobe, mod = 0;
+ int fd, i, ndx, eprobe, uses_funcdesc = 0, mod = 0;
Elf *elf = NULL;
GElf_Ehdr ehdr;
Elf_Scn *scn_rel, *scn_sym, *scn_str, *scn_tgt;
@@ -1250,6 +1253,9 @@
emachine1 = emachine2 = EM_MIPS;
#elif defined(__powerpc__)
emachine1 = emachine2 = EM_PPC64;
+#if !defined(_CALL_ELF) || _CALL_ELF == 1
+ uses_funcdesc = 1;
+#endif
#elif defined(__sparc)
emachine1 = emachine2 = EM_SPARCV9;
#elif defined(__i386) || defined(__amd64)
@@ -1394,7 +1400,7 @@
continue;
if (dt_symtab_lookup(data_sym, 0, isym, rela.r_offset,
- shdr_rel.sh_info, &fsym, (emachine1 == EM_PPC64),
+ shdr_rel.sh_info, &fsym, uses_funcdesc,
elf) != 0) {
dt_strtab_destroy(strtab);
goto err;
@@ -1565,7 +1571,7 @@
if (dt_symtab_lookup(data_sym, osym, isym,
rela.r_offset, shdr_rel.sh_info, &fsym,
- (emachine1 == EM_PPC64), elf) == 0) {
+ uses_funcdesc, elf) == 0) {
if (fsym.st_name > data_str->d_size)
goto err;
@@ -1574,7 +1580,7 @@
s = strchr(s, '.') + 1;
} else if (dt_symtab_lookup(data_sym, 0, osym,
rela.r_offset, shdr_rel.sh_info, &fsym,
- (emachine1 == EM_PPC64), elf) == 0) {
+ uses_funcdesc, elf) == 0) {
u_int bind;
bind = GELF_ST_BIND(fsym.st_info) == STB_WEAK ?

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 28, 6:28 PM (4 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27339454
Default Alt Text
D22403.id64507.diff (1 KB)

Event Timeline