Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148046639
D8702.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
864 B
Referenced Files
None
Subscribers
None
D8702.diff
View Options
Index: head/contrib/elftoolchain/readelf/readelf.c
===================================================================
--- head/contrib/elftoolchain/readelf/readelf.c
+++ head/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
Mon, Mar 16, 9:52 AM (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29765151
Default Alt Text
D8702.diff (864 B)
Attached To
Mode
D8702: readelf(1): Add support for extended program header numbers
Attached
Detach File
Event Timeline
Log In to Comment