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
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to