History log of /openbsd-current/lib/libc/arch/powerpc/sys/sbrk.S
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.18 10-Dec-2023 deraadt

Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL)
with {uint offset, uint syscall#} entries in libc & ld.so.
In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit)
are duplicated because additional or inline uses occur (that situation
is handled elsewhere)
ok kettenis


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.17 08-Dec-2022 guenther

_C_LABEL() and _ASM_LABEL() are no longer useful in the "everything
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386,
macppc, mips64, and sparc64 code.

ok deraadt@ jca@ krw@


Revision tags: OPENBSD_7_2_BASE
# 1.16 10-Jun-2022 guenther

Add _?ENTRY_NB() macro for doing an ASM function entry without
setting the binding to global (NB == "no binding"), as clang 13 is
now warning about changing the binding from global to weak. Use
them for bcopy, brk, and sbrk.

Add the '.L' prefix to internal labels in the bcopy implementation
to remove them from the symbol table

Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h
that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files
that don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.

ok gkoehler@


Revision tags: OPENBSD_7_1_BASE
# 1.15 25-Oct-2021 jca

Make brk() and sbrk() weak again as intended.

Apparently spotted by mortimer@ while working on clang 13 and amd64.
No actual change on sparc64 as this architecture still uses ld.bfd.
ok kettenis@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 26-Oct-2020 gkoehler

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision


# 1.17 08-Dec-2022 guenther

_C_LABEL() and _ASM_LABEL() are no longer useful in the "everything
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386,
macppc, mips64, and sparc64 code.

ok deraadt@ jca@ krw@


Revision tags: OPENBSD_7_2_BASE
# 1.16 10-Jun-2022 guenther

Add _?ENTRY_NB() macro for doing an ASM function entry without
setting the binding to global (NB == "no binding"), as clang 13 is
now warning about changing the binding from global to weak. Use
them for bcopy, brk, and sbrk.

Add the '.L' prefix to internal labels in the bcopy implementation
to remove them from the symbol table

Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h
that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files
that don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.

ok gkoehler@


Revision tags: OPENBSD_7_1_BASE
# 1.15 25-Oct-2021 jca

Make brk() and sbrk() weak again as intended.

Apparently spotted by mortimer@ while working on clang 13 and amd64.
No actual change on sparc64 as this architecture still uses ld.bfd.
ok kettenis@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 26-Oct-2020 gkoehler

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision


# 1.16 10-Jun-2022 guenther

Add _?ENTRY_NB() macro for doing an ASM function entry without
setting the binding to global (NB == "no binding"), as clang 13 is
now warning about changing the binding from global to weak. Use
them for bcopy, brk, and sbrk.

Add the '.L' prefix to internal labels in the bcopy implementation
to remove them from the symbol table

Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h
that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files
that don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.

ok gkoehler@


Revision tags: OPENBSD_7_1_BASE
# 1.15 25-Oct-2021 jca

Make brk() and sbrk() weak again as intended.

Apparently spotted by mortimer@ while working on clang 13 and amd64.
No actual change on sparc64 as this architecture still uses ld.bfd.
ok kettenis@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 26-Oct-2020 gkoehler

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision


# 1.15 25-Oct-2021 jca

Make brk() and sbrk() weak again as intended.

Apparently spotted by mortimer@ while working on clang 13 and amd64.
No actual change on sparc64 as this architecture still uses ld.bfd.
ok kettenis@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 26-Oct-2020 gkoehler

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision


# 1.14 26-Oct-2020 gkoehler

Retguard asm macros for powerpc libc, ld.so

Add retguard to some, but not all, asm functions in libc. Edit SYS.h
in libc to remove the PREFIX macros and add SYSENTRY (more like
aarch64 and powerpc64), so we can insert RETGUARD_SETUP after
SYSENTRY. Some .S files in this commit don't get retguard, but do
stop using the old prefix macros.

Tested by deraadt@, who put this diff in a macppc snap.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.13 30-May-2016 guenther

Consistently reference '_end' instead of 'end' in the brk/sbrk implementation

ok deraadt@


# 1.12 15-May-2016 guenther

TIB conversion is complete, so set errno in the syscall stub and eliminate
__cerror

ok ketternis@


# 1.11 07-May-2016 guenther

Use a Thread Information Block in both single and multi-threaded programs.
This stores errno, the cancelation flags, and related bits for each thread
and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!

Make libpthread dlopen'able by moving the cancelation wrappers into libc
and doing locking and fork/errno handling via callbacks that libpthread
registers when it first initializes. 'errno' *must* be declared via
<errno.h> now!

Clean up libpthread's symbol exports like libc.

On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.

Testing by various, particularly sthen@ and patrick@
ok kettenis@


Revision tags: OPENBSD_5_9_BASE
# 1.10 05-Sep-2015 guenther

Adds hidden _libc_FOO aliases for the system call stubs.
Stop generating _brk and _sbrk symbols: they've already been hidden.
Set the ELF symbol size on the syscall stubs.
Give the __{min,cur}brk symbols a size and type, and hide more jump labels.

ok deraadt@


# 1.9 26-Aug-2015 guenther

Hide many (194!) symbols that nothing should be using.
Delete exect(2); it wasn't portable across archs and nothing used it.

ports test build by naddy@
ok deraadt@ kettenis@


# 1.8 23-Aug-2015 kettenis

Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with the
Secure-PLT ABI.


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 22-Aug-2012 deraadt

Fix missing PIC -> __PIC__ conversions; ok pascal


Revision tags: OPENBSD_3_3_BASE OPENBSD_3_4_BASE OPENBSD_3_5_BASE 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
# 1.6 07-Oct-2002 drahn

kick, kick. Fix these files which did not come from NetBSD, but the
powerpc port by Dale Rahn.


# 1.5 07-Oct-2002 drahn

s/curbrk/__curbrk/ as suggested by art, a few _ASM_LABEL added as appropriate.


# 1.4 07-Oct-2002 drahn

cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL()
added as appropriate.


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE OPENBSD_3_1_BASE OPENBSD_3_2_BASE
# 1.3 12-Mar-1999 rahnds

Fixes to the currently unused PIC support in the powerpc asm files.
contact rahnds@openbsd.org before attempting to use this funcationality.


# 1.2 28-Jan-1999 rahnds

Preliminary version for PIC support. Builds and runs standard and profiled
just fine. pic version has been compiled, but without a ld.so has not been
tested. Needs binutils 2.9.1 or later to build pic version.


# 1.1 21-Dec-1996 rahnds

branches: 1.1.1;
Initial revision