diff options
| -rw-r--r-- | pkg/elftoolchain/patch/0005-Allow-empty-Elf_Data.patch | 26 | ||||
| -rw-r--r-- | pkg/elftoolchain/ver | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/pkg/elftoolchain/patch/0005-Allow-empty-Elf_Data.patch b/pkg/elftoolchain/patch/0005-Allow-empty-Elf_Data.patch new file mode 100644 index 00000000..f1aff7a2 --- /dev/null +++ b/pkg/elftoolchain/patch/0005-Allow-empty-Elf_Data.patch @@ -0,0 +1,26 @@ +From fe335f0f01aabe08df740092306ecc107ff5d96d Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 28 Jun 2021 18:23:22 -0700 +Subject: [PATCH] Allow empty Elf_Data + +--- + libelf/elf_update.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libelf/elf_update.c b/libelf/elf_update.c +index 3e19b78a..62f64fc1 100644 +--- a/libelf/elf_update.c ++++ b/libelf/elf_update.c +@@ -815,6 +815,9 @@ _libelf_write_scn(Elf *e, unsigned char *nf, struct _Elf_Extent *ex) + LIBELF_PRIVATE(fillchar), + (size_t) (sh_off + d->d_off - (uint64_t) rc)); + ++ if (d->d_size == 0) ++ continue; ++ + rc = (off_t) (sh_off + d->d_off); + + assert(d->d_buf != NULL); +-- +2.32.0 + diff --git a/pkg/elftoolchain/ver b/pkg/elftoolchain/ver index bffb3763..2a76eec1 100644 --- a/pkg/elftoolchain/ver +++ b/pkg/elftoolchain/ver @@ -1 +1 @@ -ce6d62aaba r0 +ce6d62aaba r1 |
