Home | History | Annotate | only in /src/tests/lib/csu
History log of /src/tests/lib/csu
RevisionDateAuthorComments
 1.12 10-Jun-2025  christos centralize pack-relative-relocs handling
 1.11 08-Jun-2025  christos Fix the clang build which complains about pack-relative-relocs ignored.
 1.10 02-May-2025  riastradh lib/csu: Test a static PIE with RELR relocations.

PR bin/59360: ld.elf_so(8): missing RELR support
 1.9 27-Apr-2025  riastradh tests/lib/csu: Build h_hello.o with -fPIE, not -fpie.

Static libraries like libc may overflow the bounds assumed by -fpie.
Resolves:

h_hello.o: in function `main':
h_hello.c:(.text.startup+0x30): relocation truncated to fit: R_SPARC_GOT13 against symbol `__sF' defined in .data.rel section in /tmp/build/2025.04.27.10.22.23-sparc64/destdir/usr/lib/libc.a(findfp.o)

PR lib/59359: static pies are broken
 1.8 27-Apr-2025  riastradh lib/csu: Add tests of {static, dynamic} x {pie, non-pie}.

Main goal here is to test static pies, but let's take advantage of
this to test the same code several ways, since the csu logic has some
differences for static vs dynamic builds too like the ordering of
_libc_init calls.

PR lib/59359: static pies are broken
 1.7 27-Dec-2018  christos branches: 1.7.12;
Add an initfini_array test that does not depend on the linker putting it
there automatically.
 1.6 09-Mar-2018  joerg branches: 1.6.2;
Add ifunc support for statically linked applications on x86, ppc, sparc
and ARM.
 1.5 04-Apr-2016  joerg branches: 1.5.14;
Replace LDADD with LDSTATIC.
 1.4 02-Jan-2011  skrll Whitespace.
 1.3 30-Nov-2010  joerg Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.5.14.2 18-Jan-2019  pgoyette Synch with HEAD
 1.5.14.1 15-Mar-2018  pgoyette Synch with HEAD
 1.6.2.1 10-Jun-2019  christos Sync with HEAD
 1.7.12.1 02-Aug-2025  perseant Sync with HEAD
 1.2 11-Dec-2013  matt Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1 30-Nov-2010  joerg branches: 1.1.6; 1.1.12;
Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
 1.1.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 03-Nov-2010  christos add Makefile.inc everywhere so that we can set WARNS=4 by default. Amazing
how many bugs this found :-)
 1.1 27-Apr-2025  riastradh branches: 1.1.4;
lib/csu: Add tests of {static, dynamic} x {pie, non-pie}.

Main goal here is to test static pies, but let's take advantage of
this to test the same code several ways, since the csu logic has some
differences for static vs dynamic builds too like the ordering of
_libc_init calls.

PR lib/59359: static pies are broken
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 27-Apr-2025  perseant file h_hello.c was added on branch perseant-exfatfs on 2025-08-02 05:58:03 +0000
 1.7 21-Jun-2022  skrll Support ifunc on aarch64. The tests pass at least.
 1.6 21-Jun-2022  skrll Wrap long #if defined(...) || ... and sort. NFCI.
 1.5 13-Jun-2022  martin Restore arm in the list of architectures supporting ifunc, accidently
lost in the OABI removal.
 1.4 07-Jun-2021  christos Good bye oabi! Tested building earmv7hf.
 1.3 03-Jun-2021  christos PR/56230: Jan-Benedict Glaw: arm oabi does not and will not have ifunc support.
 1.2 11-Mar-2018  joerg branches: 1.2.2; 1.2.12;
Stub out on platforms without ifunc support in the linker.
 1.1 09-Mar-2018  joerg Add ifunc support for statically linked applications on x86, ppc, sparc
and ARM.
 1.2.12.1 06-Jun-2021  cjep sync with head
 1.2.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.2.2.1 11-Mar-2018  pgoyette file h_ifunc_static.c was added on branch pgoyette-compat on 2018-03-15 09:12:07 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.1 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.2 04-Aug-2010  joerg Rename h_initfini3 dso now that it is a simple module.
 1.1 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 27-Dec-2018  christos branches: 1.1.2; 1.1.4;
Add an initfini_array test that does not depend on the linker putting it
there automatically.
 1.1.4.2 10-Jun-2019  christos Sync with HEAD
 1.1.4.1 27-Dec-2018  christos file h_initfini_array.c was added on branch phil-wifi on 2019-06-10 22:10:02 +0000
 1.1.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.1 27-Dec-2018  pgoyette file h_initfini_array.c was added on branch pgoyette-compat on 2019-01-18 08:51:00 +0000
 1.2 30-Nov-2010  joerg Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
 1.1 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.5 27-Dec-2018  christos Add an initfini_array test that does not depend on the linker putting it
there automatically.
 1.4 11-Dec-2011  joerg branches: 1.4.38; 1.4.40;
Test LD_PRELOAD for stack alignment as well. This exposes issues on
AMD64.
 1.3 07-Nov-2010  jmmv branches: 1.3.6;
Adjusts tests after import of atf-0.12:

- The use.fs property is gone.
- Mark the tests/fs/t_create:attrs test as broken when using the default
unprivileged-user:_atf setting. This probably deserves a fix somehow
but I'm not sure at this point.
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.3.6.1 17-Apr-2012  yamt sync with head
 1.4.40.1 10-Jun-2019  christos Sync with HEAD
 1.4.38.1 18-Jan-2019  pgoyette Synch with HEAD
 1.3 02-May-2025  riastradh branches: 1.3.4;
lib/csu: Add support for RELR relocations in static PIEs.

Same logic as in ld.elf_so, but baked into the executable itself for
static PIEs.

Addendum to proposal on tech-userlevel:
https://mail-index.NetBSD.org/tech-userlevel/2025/04/27/msg014727.html

PR bin/59360: ld.elf_so(8): missing RELR support
 1.2 02-May-2025  riastradh lib/csu: Test a static PIE with RELR relocations.

PR bin/59360: ld.elf_so(8): missing RELR support
 1.1 27-Apr-2025  riastradh lib/csu: Add tests of {static, dynamic} x {pie, non-pie}.

Main goal here is to test static pies, but let's take advantage of
this to test the same code several ways, since the csu logic has some
differences for static vs dynamic builds too like the ordering of
_libc_init calls.

PR lib/59359: static pies are broken
 1.3.4.2 02-Aug-2025  perseant Sync with HEAD
 1.3.4.1 02-May-2025  perseant file t_hello.sh was added on branch perseant-exfatfs on 2025-08-02 05:58:03 +0000
 1.4 22-Jun-2022  wiz test: fix typo and improve wording
 1.3 21-Jun-2022  skrll Support ifunc on aarch64. The tests pass at least.
 1.2 30-Jan-2019  martin Move from uname -m to uname -p when checking if this target does support
ifunc - someone with a powerpc machine please double check!
 1.1 09-Mar-2018  joerg branches: 1.1.2; 1.1.4;
Add ifunc support for statically linked applications on x86, ppc, sparc
and ARM.
 1.1.4.1 10-Jun-2019  christos Sync with HEAD
 1.1.2.2 15-Mar-2018  pgoyette Synch with HEAD
 1.1.2.1 09-Mar-2018  pgoyette file t_ifunc_static.sh was added on branch pgoyette-compat on 2018-03-15 09:12:07 +0000
 1.1 11-Dec-2013  matt branches: 1.1.4; 1.1.8;
Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 11-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:48 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 11-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.1 11-Dec-2013  matt branches: 1.1.4; 1.1.8;
Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 11-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:48 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 11-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.1 15-Nov-2013  skrll branches: 1.1.4; 1.1.8;
Check stack alignment on hppa.
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 15-Nov-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:48 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 15-Nov-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.2 12-Dec-2010  joerg Simplify
 1.1 03-Dec-2010  joerg Actually add the check_stack_alignment implementation for x86.
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.2 16-Mar-2014  cherry branches: 1.2.4; 1.2.8;
Fix comment: ar.bsp is the RSE backing store base pointer, not ar.bspstore
 1.1 16-Mar-2014  cherry Add stack align test stub for ia64 native csu
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 16-Mar-2014  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 16-Mar-2014  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.1 11-Dec-2013  matt branches: 1.1.4; 1.1.8;
Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 11-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 11-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.2 27-Feb-2017  chs check the lower bits of the stack pointer,
not the lower bits of the upper half of the stack pointer.
 1.1 11-Dec-2013  matt branches: 1.1.4; 1.1.8; 1.1.12; 1.1.16;
Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1.16.1 21-Apr-2017  bouyer Sync with HEAD
 1.1.12.1 20-Mar-2017  pgoyette Sync with HEAD
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 11-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 11-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:19 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.2 24-Aug-2023  rin riscv: tests/lib/csu: Fix typo in check_stack_alignment()

Now, all tests in tests/lib/csu successfully pass for riscv64.
 1.1 07-May-2023  skrll RISC-V support that works on QEMU with a single hart.

Thanks for Simon Burge for plic(4).
 1.1 12-Dec-2013  martin branches: 1.1.4; 1.1.8;
Add stack alignement test for sparc
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 12-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 12-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:20 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.1 15-Nov-2013  martin branches: 1.1.4; 1.1.8;
Add stack alignement checking for sparc64
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 15-Nov-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 15-Nov-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:20 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.1 11-Dec-2013  matt branches: 1.1.4; 1.1.8;
Add stack alignment checks for alpha, arm, mips, powerpc, and vax.
Fix makefile to support MACHINE_CPU
 1.1.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 11-Dec-2013  tls file h_initfini_align.S was added on branch tls-maxphys on 2014-08-20 00:04:49 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 11-Dec-2013  yamt file h_initfini_align.S was added on branch yamt-pagecache on 2014-05-22 11:42:20 +0000
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.2 12-Dec-2010  joerg Simplify
 1.1 03-Dec-2010  joerg Actually add the check_stack_alignment implementation for x86.
 1.2 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.1 17-Jul-2010  jmmv Convert the csu tests to atf.
Initial work from the GSoC 2008 project by Lukasz Strzygowski.
 1.4 30-Nov-2010  joerg Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
 1.3 04-Aug-2010  joerg Simplify.
 1.2 04-Aug-2010  joerg TESTSBASE is provided by bsd.own.mk now.
 1.1 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.2 30-Nov-2010  joerg Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.
 1.1 28-Jul-2010  joerg Replace csu test case with a C++ based version. This makes the various
assembler routines obsolete. Be more exhaustive by testing dynamically
linked, statically linked and dynamically loaded.

XXX currently hard-codes /usr/tests due to limitations of bsd.test.mk
 1.3 07-Dec-2010  joerg Kill file that should be pulled in from a different directory.
Fixes regression test for i386.
 1.1 30-Nov-2010  joerg Test alignment of constructor / destructor calls as well as the stack
of new threads. Currently implement for i386 and AMD64.

RSS XML Feed