exit(2);
}
-/*****************************************************************************/
/*
*
*/
}
return 0;
+}
-} /* end main() */
-
-/*****************************************************************************/
/*
* extract a RELA table
* - need to canonicalise the entries in case section addition/removal has
}
verbose("%02x %4d %s [canon]\n", csum, secix, sh_name);
+}
-} /* end extract_elf64_rela() */
-
-/*****************************************************************************/
/*
* extract a REL table
* - need to canonicalise the entries in case section addition/removal has
}
verbose("%02x %4d %s [canon]\n", csum, secix, sh_name);
+}
-} /* end extract_elf64_rel() */
-
-/*****************************************************************************/
/*
* extract the data from a 64-bit module
*/
symbols = NULL;
strings = NULL;
+ nstrings = 0;
+ nsyms = 0;
for (loop = 1; loop < shnum; loop++) {
const char *sh_name = secstrings + get32(§ions[loop].sh_name);
verbose("%08lx (%lu bytes csum 0x%02x)\n",
ftell(outfd), ftell(outfd), xcsum);
+}
-} /* end extract_elf64() */
-
-/*****************************************************************************/
/*
* extract a RELA table
* - need to canonicalise the entries in case section addition/removal has
}
verbose("%02x %4d %s [canon]\n", csum, secix, sh_name);
+}
-} /* end extract_elf32_rela() */
-
-/*****************************************************************************/
/*
* extract a REL table
* - need to canonicalise the entries in case section addition/removal has
/* canonicalise the section used by the symbol */
if (st_shndx > SHN_UNDEF && st_shndx < nsects)
set16(&relocation.st_shndx, canonmap[st_shndx]);
-
+
write_out_val(relocation);
/* undefined symbols must be named if referenced */
}
verbose("%02x %4d %s [canon]\n", csum, secix, sh_name);
+}
-} /* end extract_elf32_rel() */
-
-/*****************************************************************************/
/*
* extract the data from a 32-bit module
*/
symbols = NULL;
strings = NULL;
+ nstrings = 0;
+ nsyms = 0;
for (loop = 1; loop < shnum; loop++) {
const char *sh_name = secstrings + get32(§ions[loop].sh_name);
verbose("%08lx (%lu bytes csum 0x%02x)\n",
ftell(outfd), ftell(outfd), xcsum);
-
-} /* end extract_elf32() */
+}