[Rpm-maint] [rpm-software-management/rpm] debugedit fails to update section headers (#423)
Sergei Trofimovich
notifications at github.com
Mon Sep 24 22:33:00 UTC 2018
The following workaround allows to maintain original section order:
```diff
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -2342,21 +2342,21 @@ fdopen_dso (int fd, const char *name)
}
if (elf_getphdrnum (elf, &phnum) != 0)
{
error (0, 0, "Couldn't get number of phdrs: %s", elf_errmsg (-1));
goto error_out;
}
/* If there are phdrs we want to maintain the layout of the
allocated sections in the file. */
- if (phnum != 0)
+ //if (phnum != 0)
elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT);
memset (dso, 0, sizeof(DSO));
dso->elf = elf;
dso->phnum = phnum;
dso->ehdr = ehdr;
dso->scn = (Elf_Scn **) &dso->shdr[ehdr.e_shnum + 20];
for (i = 0; i < ehdr.e_shnum; ++i)
{
```
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/423#issuecomment-424147426
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180924/2b82c353/attachment.html>
More information about the Rpm-maint
mailing list