[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH 07/13] dbghelp: Use local ELF program segment header declaration.
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2020-03-31 16:22:00
Message-ID: a3c5d4ba-8a1e-19c2-a36c-c13a91002d05 () codeweavers ! com
[Download RAW message or body]

Based on glibc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
  dlls/dbghelp/elf_module.c | 24 ++++++++++++++++++++++--
  1 file changed, 22 insertions(+), 2 deletions(-)



["0007-dbghelp-Use-local-ELF-program-segment-header-declarati.txt" (text/x-patch)]

diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 3a9af1d15d..01ba4528e0 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -470,7 +470,17 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map*
     {
         if (fmap->addr_size == 32)
         {
-            Elf32_Phdr phdr;
+            struct
+            {
+                UINT32  p_type;    /* Segment type */
+                UINT32  p_offset;  /* Segment file offset */
+                UINT32  p_vaddr;   /* Segment virtual address */
+                UINT32  p_paddr;   /* Segment physical address */
+                UINT32  p_filesz;  /* Segment size in file */
+                UINT32  p_memsz;   /* Segment size in memory */
+                UINT32  p_flags;   /* Segment flags */
+                UINT32  p_align;   /* Segment alignment */
+            } phdr;
 
             if (elf_map_file_read(fmap, emfd, &phdr, sizeof(phdr),
                                   fmap->u.elf.elfhdr.e_phoff + i * sizeof(phdr)) &&
@@ -483,7 +493,17 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map*
         }
         else
         {
-            Elf64_Phdr phdr;
+            struct
+            {
+                UINT32  p_type;    /* Segment type */
+                UINT32  p_flags;   /* Segment flags */
+                UINT64  p_offset;  /* Segment file offset */
+                UINT64  p_vaddr;   /* Segment virtual address */
+                UINT64  p_paddr;   /* Segment physical address */
+                UINT64  p_filesz;  /* Segment size in file */
+                UINT64  p_memsz;   /* Segment size in memory */
+                UINT64  p_align;   /* Segment alignment */
+            } phdr;
 
             if (elf_map_file_read(fmap, emfd, &phdr, sizeof(phdr),
                                   fmap->u.elf.elfhdr.e_phoff + i * sizeof(phdr)) &&



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic