#
1.19 |
|
18-Nov-2023 |
deraadt |
crt0 uses a helper function in a MD src/libexec/ld.so .h file (rather than reproducing the relevant defines and code in a different place) to perform minor relocations. If things go very wrong, it would call _dl_exit() -- a locally defined crt0 function which is syscall exit(2). We don't need to call exit(2) for this obscure case which doesn't happen and provides no debugging information. An 'abort' is going to provide better information. So let's change the function name to _dso_abort() and make it a single illegal instruction. ok guenther
|
Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE
|
#
1.18 |
|
31-Jan-2022 |
guenther |
Inline RELOC_* into boot_md.c and simplify the code based on what we can verify at build time. Track dt_pltgot as an Elf_Addr instead of an Elf_Addr* to eliminat casts on both setting and using. Set RELATIVE_RELOC so the ld.so Makefile can verify that it has just the relocation types we expect.
Nothing depends on archdep.h pulling in other #includes anymore, so delete the #includes and hide the RELOC_* functions that are only used by lib/csu behind "#ifdef RCRT0"
Tested with full build.
|
#
1.17 |
|
14-Nov-2021 |
guenther |
Delete all the no-op RELOC_GOT() macros and their uses. Annotate RELOC_DYN() on non-hppa as only used in lib/csu. Delete some inconsistent comments, adjust whitespace, and reorder mips64's archdep.h so that the ld.so/*/archdep.h files look (almost) the same.
ok visa@ kettenis@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.16 |
|
27-Oct-2017 |
mpi |
Use <elf.h> instead of <elf_abi.h>
ok jasper@, jca@, deraadt@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.15 |
|
24-Jan-2017 |
guenther |
On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom().
prompted by a complaint from jsing@ ok jsing@ deraadt@
|
#
1.14 |
|
21-Jan-2017 |
guenther |
_dl_exit() is __dead, so it should return void. Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and remove pointless casts and unnecessary parens.
ok kettenis@
|
#
1.13 |
|
20-Jan-2017 |
guenther |
Delete ancient macros and unnecessary #includes
ok deraadt@
|
#
1.12 |
|
09-Jan-2017 |
kettenis |
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.11 |
|
18-May-2016 |
deraadt |
fix types for mmap wrappers. A few whitespace cleanups snuck in. ok guenther
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
06-Dec-2015 |
guenther |
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok kettenis@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.9 |
|
19-Jan-2014 |
guenther |
Only i386 needs mquery; delete the static inlines from amd64 and hppa
|
#
1.8 |
|
24-Dec-2013 |
kettenis |
Remove some leftover bits that are no longer necessary now that we no longer call atexit(4) directly on hppa.
|
#
1.7 |
|
13-Nov-2013 |
guenther |
Complete the prototype in a function cast to quiet a gcc warning
ok deraadt@
|
Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.6 |
|
13-Jan-2013 |
miod |
Correctly process RELOC_DIR32 while relocating ld.so itself; this allow global data initializers to work as intended. ok drahn kettenis@
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.5 |
|
02-Jan-2010 |
kettenis |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.4 |
|
09-Apr-2008 |
kurt |
Improve support for shared libs linked at non-zero addreses: - rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base.
With help and okay drahn@
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.3 |
|
16-Sep-2005 |
drahn |
Rework symbol lookup to more closely match sun's documentation, now treats dlopens as load groups. ok kurt@
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.2 |
|
07-Jun-2004 |
mickey |
fixup the dlsym() return to produce a callable address (plabel) and move one comment closer to the code it talks about earlier; drahn@ ok
|
#
1.1 |
|
25-May-2004 |
mickey |
md parts for hppa
|
#
1.18 |
|
31-Jan-2022 |
guenther |
Inline RELOC_* into boot_md.c and simplify the code based on what we can verify at build time. Track dt_pltgot as an Elf_Addr instead of an Elf_Addr* to eliminat casts on both setting and using. Set RELATIVE_RELOC so the ld.so Makefile can verify that it has just the relocation types we expect.
Nothing depends on archdep.h pulling in other #includes anymore, so delete the #includes and hide the RELOC_* functions that are only used by lib/csu behind "#ifdef RCRT0"
Tested with full build.
|
#
1.17 |
|
14-Nov-2021 |
guenther |
Delete all the no-op RELOC_GOT() macros and their uses. Annotate RELOC_DYN() on non-hppa as only used in lib/csu. Delete some inconsistent comments, adjust whitespace, and reorder mips64's archdep.h so that the ld.so/*/archdep.h files look (almost) the same.
ok visa@ kettenis@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.16 |
|
27-Oct-2017 |
mpi |
Use <elf.h> instead of <elf_abi.h>
ok jasper@, jca@, deraadt@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.15 |
|
24-Jan-2017 |
guenther |
On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom().
prompted by a complaint from jsing@ ok jsing@ deraadt@
|
#
1.14 |
|
21-Jan-2017 |
guenther |
_dl_exit() is __dead, so it should return void. Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and remove pointless casts and unnecessary parens.
ok kettenis@
|
#
1.13 |
|
20-Jan-2017 |
guenther |
Delete ancient macros and unnecessary #includes
ok deraadt@
|
#
1.12 |
|
09-Jan-2017 |
kettenis |
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.11 |
|
18-May-2016 |
deraadt |
fix types for mmap wrappers. A few whitespace cleanups snuck in. ok guenther
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
06-Dec-2015 |
guenther |
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok kettenis@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.9 |
|
19-Jan-2014 |
guenther |
Only i386 needs mquery; delete the static inlines from amd64 and hppa
|
#
1.8 |
|
24-Dec-2013 |
kettenis |
Remove some leftover bits that are no longer necessary now that we no longer call atexit(4) directly on hppa.
|
#
1.7 |
|
13-Nov-2013 |
guenther |
Complete the prototype in a function cast to quiet a gcc warning
ok deraadt@
|
Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.6 |
|
13-Jan-2013 |
miod |
Correctly process RELOC_DIR32 while relocating ld.so itself; this allow global data initializers to work as intended. ok drahn kettenis@
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.5 |
|
02-Jan-2010 |
kettenis |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.4 |
|
09-Apr-2008 |
kurt |
Improve support for shared libs linked at non-zero addreses: - rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base.
With help and okay drahn@
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.3 |
|
16-Sep-2005 |
drahn |
Rework symbol lookup to more closely match sun's documentation, now treats dlopens as load groups. ok kurt@
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.2 |
|
07-Jun-2004 |
mickey |
fixup the dlsym() return to produce a callable address (plabel) and move one comment closer to the code it talks about earlier; drahn@ ok
|
#
1.1 |
|
25-May-2004 |
mickey |
md parts for hppa
|
#
1.17 |
|
14-Nov-2021 |
guenther |
Delete all the no-op RELOC_GOT() macros and their uses. Annotate RELOC_DYN() on non-hppa as only used in lib/csu. Delete some inconsistent comments, adjust whitespace, and reorder mips64's archdep.h so that the ld.so/*/archdep.h files look (almost) the same.
ok visa@ kettenis@
|
Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.16 |
|
27-Oct-2017 |
mpi |
Use <elf.h> instead of <elf_abi.h>
ok jasper@, jca@, deraadt@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.15 |
|
24-Jan-2017 |
guenther |
On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom().
prompted by a complaint from jsing@ ok jsing@ deraadt@
|
#
1.14 |
|
21-Jan-2017 |
guenther |
_dl_exit() is __dead, so it should return void. Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and remove pointless casts and unnecessary parens.
ok kettenis@
|
#
1.13 |
|
20-Jan-2017 |
guenther |
Delete ancient macros and unnecessary #includes
ok deraadt@
|
#
1.12 |
|
09-Jan-2017 |
kettenis |
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.11 |
|
18-May-2016 |
deraadt |
fix types for mmap wrappers. A few whitespace cleanups snuck in. ok guenther
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
06-Dec-2015 |
guenther |
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok kettenis@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.9 |
|
19-Jan-2014 |
guenther |
Only i386 needs mquery; delete the static inlines from amd64 and hppa
|
#
1.8 |
|
24-Dec-2013 |
kettenis |
Remove some leftover bits that are no longer necessary now that we no longer call atexit(4) directly on hppa.
|
#
1.7 |
|
13-Nov-2013 |
guenther |
Complete the prototype in a function cast to quiet a gcc warning
ok deraadt@
|
Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.6 |
|
13-Jan-2013 |
miod |
Correctly process RELOC_DIR32 while relocating ld.so itself; this allow global data initializers to work as intended. ok drahn kettenis@
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.5 |
|
02-Jan-2010 |
kettenis |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.4 |
|
09-Apr-2008 |
kurt |
Improve support for shared libs linked at non-zero addreses: - rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base.
With help and okay drahn@
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.3 |
|
16-Sep-2005 |
drahn |
Rework symbol lookup to more closely match sun's documentation, now treats dlopens as load groups. ok kurt@
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.2 |
|
07-Jun-2004 |
mickey |
fixup the dlsym() return to produce a callable address (plabel) and move one comment closer to the code it talks about earlier; drahn@ ok
|
#
1.1 |
|
25-May-2004 |
mickey |
md parts for hppa
|
#
1.16 |
|
27-Oct-2017 |
mpi |
Use <elf.h> instead of <elf_abi.h>
ok jasper@, jca@, deraadt@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.15 |
|
24-Jan-2017 |
guenther |
On fatal errors, kill ourselves with thrkill(0,9,NULL) instead of simply exiting, via helper functions _dl_die(), _dl_diedie(), and _dl_oom().
prompted by a complaint from jsing@ ok jsing@ deraadt@
|
#
1.14 |
|
21-Jan-2017 |
guenther |
_dl_exit() is __dead, so it should return void. Move _dl_mmap() and _dl_mquery() inlines from archdep.h to syscall.h and remove pointless casts and unnecessary parens.
ok kettenis@
|
#
1.13 |
|
20-Jan-2017 |
guenther |
Delete ancient macros and unnecessary #includes
ok deraadt@
|
#
1.12 |
|
09-Jan-2017 |
kettenis |
Remove dependency on __got_{start,end} symbols and look at PT_GNU_RELRO instead. Result in a few more pages that aren't writable on some platforms (such as hppa). Based on an initial diff from guenther@.
Thanks to deraadt@ for testing.
ok guenther@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.11 |
|
18-May-2016 |
deraadt |
fix types for mmap wrappers. A few whitespace cleanups snuck in. ok guenther
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.10 |
|
06-Dec-2015 |
guenther |
Simplify the relocation code for the ld.so bootstrap and static pie: track just the dynamic tags are needed instead of reusing the generic elf_object_t structure.
testing and feedback from miod@ ok kettenis@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.9 |
|
19-Jan-2014 |
guenther |
Only i386 needs mquery; delete the static inlines from amd64 and hppa
|
#
1.8 |
|
24-Dec-2013 |
kettenis |
Remove some leftover bits that are no longer necessary now that we no longer call atexit(4) directly on hppa.
|
#
1.7 |
|
13-Nov-2013 |
guenther |
Complete the prototype in a function cast to quiet a gcc warning
ok deraadt@
|
Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.6 |
|
13-Jan-2013 |
miod |
Correctly process RELOC_DIR32 while relocating ld.so itself; this allow global data initializers to work as intended. ok drahn kettenis@
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
|
#
1.5 |
|
02-Jan-2010 |
kettenis |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
|
Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.4 |
|
09-Apr-2008 |
kurt |
Improve support for shared libs linked at non-zero addreses: - rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base.
With help and okay drahn@
|
Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.3 |
|
16-Sep-2005 |
drahn |
Rework symbol lookup to more closely match sun's documentation, now treats dlopens as load groups. ok kurt@
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
|
#
1.2 |
|
07-Jun-2004 |
mickey |
fixup the dlsym() return to produce a callable address (plabel) and move one comment closer to the code it talks about earlier; drahn@ ok
|
#
1.1 |
|
25-May-2004 |
mickey |
md parts for hppa
|