Lines Matching refs:pnote
20192 print_core_note (Elf_Internal_Note *pnote) in print_core_note() argument
20198 if (pnote->type != NT_FILE) in print_core_note()
20212 if (pnote->descsz < 2 * addr_size) in print_core_note()
20218 descdata = (unsigned char *) pnote->descdata; in print_core_note()
20219 descend = descdata + pnote->descsz; in print_core_note()
20221 if (descdata[pnote->descsz - 1] != '\0') in print_core_note()
20234 || pnote->descsz < 2 * addr_size + count * 3 * addr_size) in print_core_note()
20678 print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote) in print_gnu_property_note() argument
20680 unsigned char * ptr = (unsigned char *) pnote->descdata; in print_gnu_property_note()
20681 unsigned char * ptr_end = ptr + pnote->descsz; in print_gnu_property_note()
20686 if (pnote->descsz < 8 || (pnote->descsz % size) != 0) in print_gnu_property_note()
20688 printf (_("<corrupt GNU_PROPERTY_TYPE, size = %#lx>\n"), pnote->descsz); in print_gnu_property_note()
20700 printf (_("<corrupt descsz: %#lx>\n"), pnote->descsz); in print_gnu_property_note()
20926 print_gnu_note (Filedata * filedata, Elf_Internal_Note *pnote) in print_gnu_note() argument
20929 switch (pnote->type) in print_gnu_note()
20936 for (i = 0; i < pnote->descsz; ++i) in print_gnu_note()
20937 printf ("%02x", pnote->descdata[i] & 0xff); in print_gnu_note()
20948 if (pnote->descsz < 16) in print_gnu_note()
20954 os = byte_get ((unsigned char *) pnote->descdata, 4); in print_gnu_note()
20955 major = byte_get ((unsigned char *) pnote->descdata + 4, 4); in print_gnu_note()
20956 minor = byte_get ((unsigned char *) pnote->descdata + 8, 4); in print_gnu_note()
20957 subminor = byte_get ((unsigned char *) pnote->descdata + 12, 4); in print_gnu_note()
20997 for (i = 0; i < pnote->descsz && pnote->descdata[i] != '\0'; ++i) in print_gnu_note()
20998 printf ("%c", pnote->descdata[i]); in print_gnu_note()
21013 if (pnote->descsz < 8) in print_gnu_note()
21018 num_entries = byte_get ((unsigned char *) pnote->descdata, 4); in print_gnu_note()
21019 mask = byte_get ((unsigned char *) pnote->descdata + 4, 4); in print_gnu_note()
21026 print_gnu_property_note (filedata, pnote); in print_gnu_note()
21037 for (i = 0; i < pnote->descsz; ++i) in print_gnu_note()
21038 printf ("%02x ", pnote->descdata[i] & 0xff); in print_gnu_note()
21067 print_v850_note (Elf_Internal_Note * pnote) in print_v850_note() argument
21071 if (pnote->descsz != 4) in print_v850_note()
21074 val = byte_get ((unsigned char *) pnote->descdata, pnote->descsz); in print_v850_note()
21082 switch (pnote->type) in print_v850_note()
21128 process_netbsd_elf_note (Elf_Internal_Note * pnote) in process_netbsd_elf_note() argument
21132 switch (pnote->type) in process_netbsd_elf_note()
21135 if (pnote->descsz < 1) in process_netbsd_elf_note()
21137 version = byte_get ((unsigned char *) pnote->descdata, sizeof (version)); in process_netbsd_elf_note()
21139 printf (" NetBSD\t\t0x%08lx\tIDENT %u (%u.%u%s%c)\n", pnote->descsz, in process_netbsd_elf_note()
21144 printf (" NetBSD\t\t0x%08lx\tIDENT %u (%u.%u.%u)\n", pnote->descsz, in process_netbsd_elf_note()
21150 printf (" NetBSD\t\t0x%08lx\tMARCH <%s>\n", pnote->descsz, in process_netbsd_elf_note()
21151 pnote->descdata); in process_netbsd_elf_note()
21155 if (pnote->descsz < 1) in process_netbsd_elf_note()
21157 version = byte_get ((unsigned char *) pnote->descdata, sizeof (version)); in process_netbsd_elf_note()
21158 printf (" NetBSD\t\t0x%08lx\tPaX <%s%s%s%s%s%s>\n", pnote->descsz, in process_netbsd_elf_note()
21169 pnote->descsz, pnote->type); in process_netbsd_elf_note()
21365 print_stapsdt_note (Elf_Internal_Note *pnote) in print_stapsdt_note() argument
21369 char *data = pnote->descdata; in print_stapsdt_note()
21370 char *data_end = pnote->descdata + pnote->descsz; in print_stapsdt_note()
21374 if (pnote->descsz < (addr_size * 3)) in print_stapsdt_note()
21442 print_fdo_note (Elf_Internal_Note * pnote) in print_fdo_note() argument
21444 if (pnote->descsz > 0 && pnote->type == FDO_PACKAGING_METADATA) in print_fdo_note()
21446 printf (_(" Packaging Metadata: %.*s\n"), (int) pnote->descsz, pnote->descdata); in print_fdo_note()
21494 print_ia64_vms_note (Elf_Internal_Note * pnote) in print_ia64_vms_note() argument
21496 unsigned int maxlen = pnote->descsz; in print_ia64_vms_note()
21498 if (maxlen < 2 || maxlen != pnote->descsz) in print_ia64_vms_note()
21501 switch (pnote->type) in print_ia64_vms_note()
21507 size_t l = strnlen (pnote->descdata + 34, maxlen - 34); in print_ia64_vms_note()
21509 printf (_(" Creation date : %.17s\n"), pnote->descdata); in print_ia64_vms_note()
21510 printf (_(" Last patch date: %.17s\n"), pnote->descdata + 17); in print_ia64_vms_note()
21513 printf (_(" Module name : %s\n"), pnote->descdata + 34); in print_ia64_vms_note()
21515 printf (_(" Module version : %s\n"), pnote->descdata + 34 + l + 1); in print_ia64_vms_note()
21527 printf (_(" Language: %.*s\n"), maxlen, pnote->descdata); in print_ia64_vms_note()
21537 byte_get ((unsigned char *) pnote->descdata, 8)); in print_ia64_vms_note()
21546 print_vms_time (byte_get ((unsigned char *) pnote->descdata, 8)); in print_ia64_vms_note()
21556 print_vms_time (byte_get ((unsigned char *) pnote->descdata, 8)); in print_ia64_vms_note()
21565 (unsigned) byte_get ((unsigned char *) pnote->descdata, 4), in print_ia64_vms_note()
21566 (unsigned) byte_get ((unsigned char *) pnote->descdata + 4, 4)); in print_ia64_vms_note()
21568 print_vms_time (byte_get ((unsigned char *) pnote->descdata + 8, 8)); in print_ia64_vms_note()
21571 byte_get ((unsigned char *) pnote->descdata + 16, 8)); in print_ia64_vms_note()
21573 (unsigned) byte_get ((unsigned char *) pnote->descdata + 24, 4)); in print_ia64_vms_note()
21574 printf (_(" Image id : %.*s\n"), maxlen - 32, pnote->descdata + 32); in print_ia64_vms_note()
21578 printf (_(" Image name: %.*s\n"), maxlen, pnote->descdata); in print_ia64_vms_note()
21582 printf (_(" Global symbol table name: %.*s\n"), maxlen, pnote->descdata); in print_ia64_vms_note()
21586 printf (_(" Image id: %.*s\n"), maxlen, pnote->descdata); in print_ia64_vms_note()
21590 printf (_(" Linker id: %.*s\n"), maxlen, pnote->descdata); in print_ia64_vms_note()
21746 print_gnu_build_attribute_description (Elf_Internal_Note * pnote, in print_gnu_build_attribute_description() argument
21758 bool is_open_attr = pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN; in print_gnu_build_attribute_description()
21760 switch (pnote->descsz) in print_gnu_build_attribute_description()
21786 start = byte_get ((unsigned char *) pnote->descdata, 4); in print_gnu_build_attribute_description()
21791 start = byte_get ((unsigned char *) pnote->descdata, 4); in print_gnu_build_attribute_description()
21792 end = byte_get ((unsigned char *) pnote->descdata + 4, 4); in print_gnu_build_attribute_description()
21796 start = byte_get ((unsigned char *) pnote->descdata, 8); in print_gnu_build_attribute_description()
21797 end = byte_get ((unsigned char *) pnote->descdata + 8, 8); in print_gnu_build_attribute_description()
21801 error (_(" <invalid description size: %lx>\n"), pnote->descsz); in print_gnu_build_attribute_description()
21861 print_gnu_build_attribute_name (Elf_Internal_Note * pnote) in print_gnu_build_attribute_name() argument
21869 const char * name = pnote->namedata; in print_gnu_build_attribute_name()
21873 if (name == NULL || pnote->namesz < 2) in print_gnu_build_attribute_name()
21875 error (_("corrupt name field in GNU build attribute note: size = %ld\n"), pnote->namesz); in print_gnu_build_attribute_name()
21888 if (pnote->namesz < 4) in print_gnu_build_attribute_name()
21890 error (_("corrupt name field in GNU build attribute note: size = %ld\n"), pnote->namesz); in print_gnu_build_attribute_name()
21963 int len = strnlen (name, pnote->namesz - (name - pnote->namedata)) + 1; in print_gnu_build_attribute_name()
21990 if ((size_t) (name - pnote->namedata) > pnote->namesz) in print_gnu_build_attribute_name()
21993 pnote->namesz, in print_gnu_build_attribute_name()
21994 name - pnote->namedata); in print_gnu_build_attribute_name()
22010 bytes = pnote->namesz - (name - pnote->namedata); in print_gnu_build_attribute_name()
22102 print_note_contents_hex (Elf_Internal_Note *pnote) in print_note_contents_hex() argument
22104 if (pnote->descsz) in print_note_contents_hex()
22109 for (i = 0; i < pnote->descsz; i++) in print_note_contents_hex()
22110 printf ("%02x ", pnote->descdata[i] & 0xff); in print_note_contents_hex()
22234 print_amdgpu_note (Elf_Internal_Note *pnote) in print_amdgpu_note() argument
22242 assert (pnote->type == NT_AMDGPU_METADATA); in print_amdgpu_note()
22245 msgpack_ret = msgpack_unpack_next (&msg, pnote->descdata, pnote->descsz, in print_amdgpu_note()
22265 print_note_contents_hex (pnote); in print_amdgpu_note()
22271 print_qnx_note (Elf_Internal_Note *pnote) in print_qnx_note() argument
22273 switch (pnote->type) in print_qnx_note()
22276 if (pnote->descsz != 12) in print_qnx_note()
22280 (unsigned) byte_get ((unsigned char *) pnote->descdata, 4)); in print_qnx_note()
22282 (unsigned) byte_get ((unsigned char *) pnote->descdata + 4, 4)); in print_qnx_note()
22284 ((unsigned) byte_get ((unsigned char *) pnote->descdata + 8, 1)) ? "no": "yes"); in print_qnx_note()
22288 print_note_contents_hex(pnote); in print_qnx_note()
22306 process_note (Elf_Internal_Note * pnote, in process_note() argument
22309 const char * name = pnote->namesz ? pnote->namedata : "(NONE)"; in process_note()
22312 if (pnote->namesz == 0) in process_note()
22315 nt = get_note_type (filedata, pnote->type); in process_note()
22317 else if (startswith (pnote->namedata, "GNU")) in process_note()
22319 nt = get_gnu_elf_note_type (pnote->type); in process_note()
22321 else if (startswith (pnote->namedata, "AMDGPU")) in process_note()
22323 nt = get_amdgpu_elf_note_type (pnote->type); in process_note()
22325 else if (startswith (pnote->namedata, "FreeBSD")) in process_note()
22327 nt = get_freebsd_elfcore_note_type (filedata, pnote->type); in process_note()
22329 else if (startswith (pnote->namedata, "NetBSD-CORE")) in process_note()
22331 nt = get_netbsd_elfcore_note_type (filedata, pnote->type); in process_note()
22333 else if (startswith (pnote->namedata, "NetBSD")) in process_note()
22335 return process_netbsd_elf_note (pnote); in process_note()
22337 else if (startswith (pnote->namedata, "PaX")) in process_note()
22339 return process_netbsd_elf_note (pnote); in process_note()
22341 else if (startswith (pnote->namedata, "OpenBSD")) in process_note()
22343 nt = get_openbsd_elfcore_note_type (filedata, pnote->type); in process_note()
22345 else if (startswith (pnote->namedata, "QNX")) in process_note()
22347 nt = get_qnx_elfcore_note_type (filedata, pnote->type); in process_note()
22349 else if (startswith (pnote->namedata, "SPU/")) in process_note()
22352 nt = pnote->namedata + 4; in process_note()
22356 else if (startswith (pnote->namedata, "IPF/VMS")) in process_note()
22358 nt = get_ia64_vms_note_type (pnote->type); in process_note()
22360 else if (startswith (pnote->namedata, "stapsdt")) in process_note()
22361 nt = get_stapsdt_note_type (pnote->type); in process_note()
22366 nt = get_note_type (filedata, pnote->type); in process_note()
22370 if (((startswith (pnote->namedata, "GA") in process_note()
22371 && strchr ("*$!+", pnote->namedata[2]) != NULL) in process_note()
22372 || strchr ("*$!+", pnote->namedata[0]) != NULL) in process_note()
22373 && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN in process_note()
22374 || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) in process_note()
22375 print_gnu_build_attribute_name (pnote); in process_note()
22380 printf (" 0x%08lx\t%s\t", pnote->descsz, nt); in process_note()
22382 printf (" 0x%08lx\t%s\n", pnote->descsz, nt); in process_note()
22384 if (startswith (pnote->namedata, "IPF/VMS")) in process_note()
22385 return print_ia64_vms_note (pnote); in process_note()
22386 else if (startswith (pnote->namedata, "GNU")) in process_note()
22387 return print_gnu_note (filedata, pnote); in process_note()
22388 else if (startswith (pnote->namedata, "stapsdt")) in process_note()
22389 return print_stapsdt_note (pnote); in process_note()
22390 else if (startswith (pnote->namedata, "CORE")) in process_note()
22391 return print_core_note (pnote); in process_note()
22392 else if (startswith (pnote->namedata, "FDO")) in process_note()
22393 return print_fdo_note (pnote); in process_note()
22394 else if (((startswith (pnote->namedata, "GA") in process_note()
22395 && strchr ("*$!+", pnote->namedata[2]) != NULL) in process_note()
22396 || strchr ("*$!+", pnote->namedata[0]) != NULL) in process_note()
22397 && (pnote->type == NT_GNU_BUILD_ATTRIBUTE_OPEN in process_note()
22398 || pnote->type == NT_GNU_BUILD_ATTRIBUTE_FUNC)) in process_note()
22399 return print_gnu_build_attribute_description (pnote, filedata); in process_note()
22400 else if (startswith (pnote->namedata, "AMDGPU") in process_note()
22401 && pnote->type == NT_AMDGPU_METADATA) in process_note()
22402 return print_amdgpu_note (pnote); in process_note()
22403 else if (startswith (pnote->namedata, "QNX")) in process_note()
22404 return print_qnx_note (pnote); in process_note()
22406 print_note_contents_hex (pnote); in process_note()