History log of /haiku/headers/private/kernel/elf_priv.h
Revision Date Author Comments
# 513403d4 14-Jun-2018 Augustin Cavalier <waddlesplash@gmail.com>

Revert team and thread changes for COMPAT_MODE (hrev52010 & hrev52011).

This reverts commit c558f9c8fe54bc14515aa62bac7826271289f0e4.
This reverts commit 44f24718b1505e8d9c75e00e59f2f471a79b5f56.
This reverts commit a69cb330301c4d697daae57e6019a307f285043e.
This reverts commit 951182620e297d10af7fdcfe32f2b04d56086ae9.

There have been multiple reports that these changes break mounting NTFS partitions
(on all systems, see #14204), and shutting down (on certain systems, see #12405.)
Until they can be fixed, they are being backed out.


# 44f24718 20-May-2018 Jérôme Duval <jerome.duval@gmail.com>

kernel/x86_64: add compatibility source files to the build.

* add x86 versions of fnsave frstor.
* add missing declaration for elf32_resolve_symbol().

How-to build a x86_64/x86 bootstrap build:
mkdir generated_bootstrap; cd generated_bootstrap
../configure --bootstrap /dir/to/haikuporter/haikuporter /dir/to/haikuports.cross \
/dir/to/haikuports --build-cross-tools x86_64 /dir/to/buildtools --build-cross-tools x86 -j8 --use-gcc-pipe
jam -q -sHAIKU_PORTER_EXTRA_OPTIONS="-j8 --sourceforge-mirror=freefr --no-source-packages" @bootstrap-raw

Change-Id: I6eae3653c42a53683ae307107fae595c4b8ebcfb


# a553e95d 04-May-2018 Jérôme Duval <jerome.duval@gmail.com>

kernel: support elf32 on x86_64.

* define ELF32_COMPAT to enable ELF32 macros.
* add a flag ELF_LOAD_USER_IMAGE_TEST_EXECUTABLE to only check the format.
It will be used by load_image_internal() to check which mode to use when
loading an image.
* in arch_elf_relocate_rel(), switch to elf_addr instead of addr_t, which
would be the wrong size for elf32 on x86_64.
* the ELF compat loader reuses the relevant parts of elf.cpp and arch_elf.cpp,
excluding for instance load_kernel_add_on() or dump functions.

Change-Id: Ifa47334e5adefd45405a823a3accbd12eee5b116


# 75c31ae2 26-Oct-2015 Simon South <ssouth@simonsouth.com>

system: Build using public elf.h header

Reduce duplication of code by

* Removing from elf_common.h definitions available in os/kernel/elf.h
* Deleting elf32.h and elf64.h
* Renaming elf_common.h to elf_private.h
* Updating source to build using public and private ELF header files
together

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>


# 3b802628 09-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Support ELF64 in the kernel.

This has been done by adding typedefs in elf_common.h to the correct ELF
structures for the architecture, and changing all Elf32_* uses to those
types. I don't know whether image loading works as I cannot test it yet,
there may be some 64-bit safety issues around. However, symbol lookup for
the kernel is working correctly.


# f6a34444 24-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added x86_64 ELF64 relocation functions for the bootloader. All that's left to do now is handle the 64-bit load address properly.


# f1244978 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# c07db2ec 26-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf61a0e 21-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a1e04b1 13-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Symbol resolution functions in the kernel: Removed the unused parameter
allowing optional prepending of a string to the symbol names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80f54692 06-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c14a34a6 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2705fb7d 08-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Replaced the regions array with the nicer text_region and data_region members.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7877 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ecfed6a7 31-May-2004 Axel Dörfler <axeld@pinc-software.de>

Added fields to hold debug symbol information.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b6b9a5a 11-May-2004 Axel Dörfler <axeld@pinc-software.de>

Added a comment (now that we're using a hash table).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 337d1d1b 27-Apr-2004 Axel Dörfler <axeld@pinc-software.de>

Made C++ safe.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7328 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a6f46d 20-Apr-2004 Axel Dörfler <axeld@pinc-software.de>

Removed ktypes.h dependency; replaced "addr" with "addr_t", some other minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7261 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e44d4929 16-Oct-2003 Axel Dörfler <axeld@pinc-software.de>

Made it independent.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5043 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29164895 12-Jan-2003 Axel Dörfler <axeld@pinc-software.de>

Must now include image.h directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2422 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7fae0705 30-Dec-2002 Axel Dörfler <axeld@pinc-software.de>

Included NewOS change 1674. Moved private elf structures to elf_priv.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b802628b8e2aa14eb4c674d0a8cf900f522baa1 09-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Support ELF64 in the kernel.

This has been done by adding typedefs in elf_common.h to the correct ELF
structures for the architecture, and changing all Elf32_* uses to those
types. I don't know whether image loading works as I cannot test it yet,
there may be some 64-bit safety issues around. However, symbol lookup for
the kernel is working correctly.


# f6a3444449c452a63e0e0d91e8480f39bca81aed 24-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added x86_64 ELF64 relocation functions for the bootloader. All that's left to do now is handle the 64-bit load address properly.


# f1244978152350f9cc010e766d09c2e9ad34dfce 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# c07db2ec3f246a20402116d8ac23a8d2f43039e6 26-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf61a0eccc21ebe33d90186064ee70c195abab9 21-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a1e04b121921344eec3e7314fafa8796e14cfaf 13-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Symbol resolution functions in the kernel: Removed the unused parameter
allowing optional prepending of a string to the symbol names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80f54692912d728f5780e9d78d7643828edaaa2a 06-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c14a34a65f69bbccfca75a0c9cd44bab21ab25d5 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2705fb7df0c1ae936e90aa77ce7bf71dc755538e 08-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Replaced the regions array with the nicer text_region and data_region members.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7877 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ecfed6a7189334c3029bc58ecc24a2e899f3394d 31-May-2004 Axel Dörfler <axeld@pinc-software.de>

Added fields to hold debug symbol information.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b6b9a5afb75ffaef6421c5cefc302eefc6a6a80 11-May-2004 Axel Dörfler <axeld@pinc-software.de>

Added a comment (now that we're using a hash table).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 337d1d1bab969b812081c0f7744968b8c9a2f687 27-Apr-2004 Axel Dörfler <axeld@pinc-software.de>

Made C++ safe.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7328 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1a6f46dc9b3c92e0441c587a17293180adb3e57 20-Apr-2004 Axel Dörfler <axeld@pinc-software.de>

Removed ktypes.h dependency; replaced "addr" with "addr_t", some other minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7261 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e44d4929cef636eb25dfc961778bae845ecefce3 16-Oct-2003 Axel Dörfler <axeld@pinc-software.de>

Made it independent.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5043 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 29164895ac245e237a7d85192fe2929cf5e0baa6 12-Jan-2003 Axel Dörfler <axeld@pinc-software.de>

Must now include image.h directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2422 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7fae0705848dc9c33a32f0e3083354eebe71130f 30-Dec-2002 Axel Dörfler <axeld@pinc-software.de>

Included NewOS change 1674. Moved private elf structures to elf_priv.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2320 a95241bf-73f2-0310-859d-f6bbb57e9c96