Displaying 5 results from an estimated 5 matches for "elf_hdr".
Did you mean:
elf_shdr
2025 Apr 21
0
[PATCH] Permit zero-sized ELF program sections
...me checks to be able to handle when a program section has
a zero on-disk size.
Here's a patch with the necessary checks:
--- a/com32/lib/sys/module/i386/elf_module.c
+++ b/com32/lib/sys/module/i386/elf_module.c
@@ -112,6 +112,14 @@ int load_segments(struct elf_module *mod
for (i = 0; i < elf_hdr->e_phnum; i++) {
cr_pht = (Elf32_Phdr*)(pht + i * elf_hdr->e_phentsize);
+ if (cr_pht->p_filesz == 0)
+ {
+ DBG_PRINT("Skipping loadable segment of zero size at vaddr 0x%08x at 0x%08x.\n"
+ cr_pht->p_vaddr,
+ (Elf32_Addr)module_get_absolute(cr_pht->p_vaddr,...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
.../lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -14,6 +14,7 @@
#include <linux/list.h>
#include <sys/module.h>
+#include <sys/exec.h>
#include "elfutils.h"
#include "common.h"
@@ -50,7 +51,7 @@ static int check_header(Elf32_Ehdr *elf_hdr) {
static int load_segments(struct elf_module *module, Elf32_Ehdr *elf_hdr) {
int i;
int res = 0;
- void *pht = NULL;
+ char *pht = NULL;
Elf32_Phdr *cr_pht;
Elf32_Addr min_addr = 0x00000000; // Min. ELF vaddr
@@ -136,8 +137,8 @@ static int load_segments(struct elf_module *module, Elf32...
2011 May 25
1
[GIT PULL] elflink ldlinux
Hi,
These patches contain support for some features that are already in
Syslinux 4 but weren't working properly on the elflink branch. It's
another step closer to feature parity with Syslinux 4.
Having to jump through the comboot API for localboot support is less
than ideal and I'll eventually fix that, probably when we move a big
chunk of code from asm to C.
Also, there's a
2012 Jun 26
2
[GIT PULL] elflink bug fixes
...dule.c b/com32/lib/sys/module/elf_module.c
index 3e37384..d8009aa 100644
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -19,8 +19,6 @@
#include "elfutils.h"
#include "common.h"
-#define MAX_NR_DEPS 64
-
static int check_header(Elf32_Ehdr *elf_hdr) {
int res;
@@ -181,9 +179,6 @@ out:
return res;
}
-static int nr_needed;
-static Elf32_Word needed[MAX_NR_DEPS];;
-
static int prepare_dynlinking(struct elf_module *module) {
Elf32_Dyn *dyn_entry = module->dyn_table;
@@ -196,8 +191,8 @@ static int prepare_dynlinking(struct elf_mo...
2012 Mar 23
19
[PATCH 00/19][elflink] Improve compatibility with 4.x
From: Matt Fleming <matt.fleming at intel.com>
The following patch series is available at,
git://git.zytor.com/users/mfleming/syslinux.git elflink
All patches are against the 'elflink' branch.
This series fixes a few serious bugs and some behavioural
incompatibilities with the 4.x series.
Matt Fleming (19):
ldlinux: Initialise 'p' before using it.
ldlinux: Parse