Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164826648
D8702.id22689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
849 B
Referenced Files
None
Subscribers
None
D8702.id22689.diff
View Options
Index: contrib/elftoolchain/readelf/readelf.c
===================================================================
--- contrib/elftoolchain/readelf/readelf.c
+++ contrib/elftoolchain/readelf/readelf.c
@@ -2112,7 +2112,7 @@
static void
dump_ehdr(struct readelf *re)
{
- size_t shnum, shstrndx;
+ size_t phnum, shnum, shstrndx;
int i;
printf("ELF Header:\n");
@@ -2174,7 +2174,13 @@
re->ehdr.e_phentsize);
/* e_phnum. */
- printf("%-37s%u\n", " Number of program headers:", re->ehdr.e_phnum);
+ printf("%-37s%u", " Number of program headers:", re->ehdr.e_phnum);
+ if (re->ehdr.e_phnum == PN_XNUM) {
+ /* Extended program header numbering is in use. */
+ if (elf_getphnum(re->elf, &phnum))
+ printf(" (%zu)", phnum);
+ }
+ putchar('\n');
/* e_shentsize. */
printf("%-37s%u (bytes)\n", " Size of section headers:",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 5:46 AM (14 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36001630
Default Alt Text
D8702.id22689.diff (849 B)
Attached To
Mode
D8702: readelf(1): Add support for extended program header numbers
Attached
Detach File
Event Timeline
Log In to Comment