[haiku-commits] haiku: hrev53297 - in headers: os/kernel compatibility/bsd/sys

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 27 Jul 2019 11:19:35 -0400 (EDT)

hrev53297 adds 1 changeset to branch 'master'
old head: 6967695c4ea72a15e7c718e43e8daf515acf4a2a
new head: 3ddf0bbc29dc201ef90f376708fbaf2dc31f2100
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=3ddf0bbc29dc+%5E6967695c4ea7

----------------------------------------------------------------------------

3ddf0bbc29dc: BSD: Use elf.h from os/kernel
  
  Platform-dependant defines for Elf_*
  
  Change-Id: Ib86554eb497d20e60ad7c75de4321d5b516ad88c
  Reviewed-on: https://review.haiku-os.org/c/1635
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Zoltán Mizsei <zmizsei@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53297
Commit:      3ddf0bbc29dc201ef90f376708fbaf2dc31f2100
URL:         https://git.haiku-os.org/haiku/commit/?id=3ddf0bbc29dc
Author:      Zoltán Mizsei <zmizsei@xxxxxxxxxxxxx>
Date:        Sat Jul 20 18:45:58 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sat Jul 27 15:19:31 2019 UTC

----------------------------------------------------------------------------

2 files changed, 14 insertions(+), 3 deletions(-)
headers/compatibility/bsd/sys/link_elf.h |  2 +-
headers/os/kernel/elf.h                  | 15 +++++++++++++--

----------------------------------------------------------------------------

diff --git a/headers/compatibility/bsd/sys/link_elf.h 
b/headers/compatibility/bsd/sys/link_elf.h
index fb76c764dd..03e4a6ca9d 100644
--- a/headers/compatibility/bsd/sys/link_elf.h
+++ b/headers/compatibility/bsd/sys/link_elf.h
@@ -47,7 +47,7 @@
 #ifdef _BSD_SOURCE
 
 
-#include <sys/elf.h>
+#include <os/kernel/elf.h>
 
 /*
  * Flags that describe the origin of the entries in Dl_serinfo.
diff --git a/headers/os/kernel/elf.h b/headers/os/kernel/elf.h
index c8ab1a87a5..f48fdcdd44 100644
--- a/headers/os/kernel/elf.h
+++ b/headers/os/kernel/elf.h
@@ -1,13 +1,14 @@
 /*
- * Copyright 2002-2016 Haiku, Inc. All rights reserved.
+ * Copyright 2002-2019 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  */
 #ifndef _ELF_H
 #define _ELF_H
 
 
-#include <SupportDefs.h>
+#include <BeBuild.h>
 #include <ByteOrder.h>
+#include <SupportDefs.h>
 
 
 typedef uint32 Elf32_Addr;
@@ -28,6 +29,16 @@ typedef int64 Elf64_Sxword;
 
 typedef Elf64_Half Elf64_Versym;
 
+#if B_HAIKU_32_BIT
+       #define Elf_Addr Elf32_Addr
+       #define Elf_Phdr Elf32_Phdr
+       #define Elf_Half Elf32_Half
+#elif B_HAIKU_64_BIT
+       #define Elf_Addr Elf64_Addr
+       #define Elf_Phdr Elf64_Phdr
+       #define Elf_Half Elf64_Half
+#endif
+
 
 /*** ELF header ***/
 


Other related posts:

  • » [haiku-commits] haiku: hrev53297 - in headers: os/kernel compatibility/bsd/sys - waddlesplash