History log of /openbsd-current/libexec/ld.so/hppa/Makefile.inc
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.8 09-Jan-2023 kettenis

Rewrite the hppa assembly code to avoid reads from .text, by using the
standard PIC magic. This makes the code similar to what we already use
for rcrt0.o. This makes it ready for execute-only.

Build C code using -fno-jump-tables to make it ready for execute-only.

ok deraadt@, miod@


# 1.7 05-Dec-2022 kettenis

Add linker script for hppa. The crucial bit is that hppa needs an extra
segment for .plt/.got which needs to be placed correctly.

ok deraadt@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.6 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.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.5 21-Oct-2019 guenther

Whoops: backout mips64+hppa CHECK_LDSO bits: they weren't done and weren't
part of the review. My fail for forgetting to diff my tree against what
was reviewed

problem noted by deraadt@


# 1.4 20-Oct-2019 guenther

For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa


# 1.7 05-Dec-2022 kettenis

Add linker script for hppa. The crucial bit is that hppa needs an extra
segment for .plt/.got which needs to be placed correctly.

ok deraadt@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.6 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.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.5 21-Oct-2019 guenther

Whoops: backout mips64+hppa CHECK_LDSO bits: they weren't done and weren't
part of the review. My fail for forgetting to diff my tree against what
was reviewed

problem noted by deraadt@


# 1.4 20-Oct-2019 guenther

For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa


# 1.6 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.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.5 21-Oct-2019 guenther

Whoops: backout mips64+hppa CHECK_LDSO bits: they weren't done and weren't
part of the review. My fail for forgetting to diff my tree against what
was reviewed

problem noted by deraadt@


# 1.4 20-Oct-2019 guenther

For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa


# 1.5 21-Oct-2019 guenther

Whoops: backout mips64+hppa CHECK_LDSO bits: they weren't done and weren't
part of the review. My fail for forgetting to diff my tree against what
was reviewed

problem noted by deraadt@


# 1.4 20-Oct-2019 guenther

For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa


# 1.4 20-Oct-2019 guenther

For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation. Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa


Revision tags: OPENBSD_6_2_BASE
# 1.3 27-Aug-2017 deraadt

hppa & sh use support functions from libgcc. Rather than linking against
the library, extract the specific pieces and link them directly.
ok kettenis visa


# 1.2 27-Aug-2017 deraadt

Replace heaps of hand-written syscall stubs with a simpler framework
which is largely MI.
ok visa kettenis


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.1 25-May-2004 mickey

md parts for hppa