Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171328761
D47383.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
820 B
Referenced Files
None
Subscribers
None
D47383.id.diff
View Options
diff --git a/lib/libkldelf/ef_obj.c b/lib/libkldelf/ef_obj.c
--- a/lib/libkldelf/ef_obj.c
+++ b/lib/libkldelf/ef_obj.c
@@ -304,9 +304,13 @@
symtabindex = -1;
symstrindex = -1;
for (i = 0; i < nshdr; i++) {
+ if (shdr[i].sh_size == 0)
+ continue;
switch (shdr[i].sh_type) {
case SHT_PROGBITS:
case SHT_NOBITS:
+ if ((shdr[i].sh_flags & SHF_ALLOC) == 0)
+ break;
ef->nprogtab++;
break;
case SHT_SYMTAB:
@@ -385,9 +389,13 @@
ra = 0;
mapbase = 0;
for (i = 0; i < nshdr; i++) {
+ if (shdr[i].sh_size == 0)
+ continue;
switch (shdr[i].sh_type) {
case SHT_PROGBITS:
case SHT_NOBITS:
+ if ((shdr[i].sh_flags & SHF_ALLOC) == 0)
+ break;
mapbase = roundup2(mapbase, shdr[i].sh_addralign);
ef->progtab[pb].addr = mapbase;
if (shdr[i].sh_type == SHT_PROGBITS) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 11, 11:12 AM (5 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38701884
Default Alt Text
D47383.id.diff (820 B)
Attached To
Mode
D47383: libkldelf: skip loading zero-sized and non-SHF_ALLOC sections
Attached
Detach File
Event Timeline
Log In to Comment