&& ndx < filedata->file_header.e_shnum
&& ndx > 0);
}
-
+
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
static inline bool
if (is_32bit_elf)
return printf ("%08" PRIx64, vma);
return printf ("%016" PRIx64, vma);
-
+
case DEC_5:
if (vma <= 99999)
return printf ("%5" PRId64, vma);
if (width_remaining < (nbytes * 2) + 2)
break;
-
+
putchar (is_utf8 ? '<' : '{');
printf ("0x");
for (i = 0; i < nbytes; i++)
{
if (unicode_display == unicode_highlight && isatty (1))
printf ("\x1B[31;47m"); /* Red. */
-
+
switch (nbytes)
{
case 2:
if (width_remaining < 6)
break;
printf ("\\u%02x%02x",
- (bytes[0] & 0x1c) >> 2,
+ (bytes[0] & 0x1c) >> 2,
((bytes[0] & 0x03) << 6) | (bytes[1] & 0x3f));
break;
case 3:
((bytes[0] & 0x07) << 6) | ((bytes[1] & 0x3c) >> 2),
((bytes[1] & 0x03) << 6) | ((bytes[2] & 0x3c) >> 2),
((bytes[2] & 0x03) << 6) | (bytes[3] & 0x3f));
-
+
break;
default:
/* URG. */
if (unicode_display == unicode_highlight && isatty (1))
printf ("\033[0m"); /* Default colour. */
}
-
+
if (bytes[nbytes - 1] == 0)
break;
}
{
#define NUM_STRING_BUFS 5
#define MAX_STRING_LEN 256
-
+
static int string_buf_index = 0;
static char string_buf [NUM_STRING_BUFS][MAX_STRING_LEN + 1];
char c;
unsigned int remaining = MAX_STRING_LEN;
-
+
while ((c = * string ++) != 0)
{
if (ISCNTRL (c))
}
* buf = 0;
- return buf_start;
+ return buf_start;
}
/* Returns a pointer to a static buffer containing a
nentries = section->sh_size / entsize;
if (nentries == 0)
return 0;
-
+
/* FIXME: This call to get_data duplicates one that follows in
dump_relr_relocations(). They could be combined into just
one call. */
if ((entry & 1) == 1)
{
uint64_t addr = where + (j * relr_entsize);
-
+
if (first)
{
print_relr_addr_and_sym (filedata, symtab, nsyms, strtab, addr);
free (relrs);
return true;
}
-
+
/* Display the contents of the relocation data found at the specified
offset. */
if (result != NULL)
return result;
-
+
switch (p_type)
{
case PT_GNU_EH_FRAME: return "GNU_EH_FRAME";
sprintf (buff, "LOPROC+%#lx", p_type - PT_LOPROC);
return buff;
}
-
+
static const char *
get_segment_type (Filedata * filedata, unsigned long p_type)
{
case SHT_GNU_verdef: return "VERDEF";
case SHT_GNU_verneed: return "VERNEED";
case SHT_GNU_versym: return "VERSYM";
-
+
case SHT_LLVM_ODRTAB: return "LLVM_ODRTAB";
case SHT_LLVM_LINKER_OPTIONS: return "LLVM_LINKER_OPTIONS";
case SHT_LLVM_ADDRSIG: return "LLVM_ADDRSIG";
case SHT_ANDROID_RELR: return "ANDROID_RELR";
case SHT_CHECKSUM: return "CHECKSUM";
-
+
/* FIXME: Are these correct ? If so, why do they not have #define's ? */
case 0x6ffffff0: return "VERSYM";
-
+
default:
break;
}
fprintf (stream, _("\
-X --extra-sym-info Display extra information when showing symbols\n"));
fprintf (stream, _("\
- --no-extra-sym-info Do not display extra information when showing symbols (default)\n"));
+ --no-extra-sym-info Do not display extra information when showing symbols (default)\n"));
fprintf (stream, _("\
-n --notes Display the contents of note sections (if present)\n"));
fprintf (stream, _("\
case OPTION_NO_EXTRA_SYM_INFO:
extra_sym_info = false;
break;
-
+
#ifdef SUPPORT_DISASSEMBLY
case 'i':
request_dump (dumpdata, DISASS_DUMP);
FIXME: It is not clear if all four bytes are used as constant magic
valus by all compilers. It may be necessary to recode this function if
different tools use different length sequences. */
-
+
static struct
{
unsigned char magic[4];
}
known_magic[] =
{
- { { 'B', 'C', 0xc0, 0xde },
+ { { 'B', 'C', 0xc0, 0xde },
N_("This is a LLVM bitcode file - try using llvm-bcanalyzer\n"),
N_("This is a LLVM bitcode file - try extracting and then using llvm-bcanalyzer\n")
},
printf ("%*s", 10 - printed, "");
}
}
-
+
/* Get the symbol's name. For section symbols without a
specific name use the (already computed) section name. */
if (ELF_ST_TYPE (psym->st_info) == STT_SECTION
}
uncompressed_buffer = xmalloc (uncompressed_size);
-
+
if (is_zstd)
{
#ifdef HAVE_ZSTD
{
uint64_t section_size = section->sh_size;
unsigned char * start = * start_ptr;
-
+
if (decompress_dumps)
{
uint64_t new_size = section_size;
deliberate user action. */
if (DEFAULT_FOR_FOLLOW_LINKS == 0 && do_follow_links)
return true;
-
- if (process_links || do_syms || do_unwind
+
+ if (process_links || do_syms || do_unwind
|| dump_any_debugging || do_dump || do_debugging)
return true;