History log of /netbsd-current/tests/libexec/ld.elf_so/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.24 22-Jul-2024 riastradh

tests/libexec/ld.elf_so/t_ifunc: Handle MKRELRO=no harder.

Don't even pass -Wl,-z,norelro if MKRELRO=no, because the toolchain's
ld(1) might not support relro _or_ norelro.

Should resolve, e.g.:

/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407182350Z-tools/bin/armv7--netbsdelf-eabihf-ld: warning: -z norelro ignored
armv7--netbsdelf-eabihf-clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- t_ifunc_norelro ---
*** Failed target: t_ifunc_norelro
*** In directory: /home/source/ab/HEAD-llvm/src/tests/libexec/ld.elf_so
*** Failed commands:
${_MKTARGET_LINK}
...


# 1.23 16-Jul-2024 riastradh

tests/libexec/ld.elf_so/t_ifunc: Handle MKRELRO=no.

Just build t_ifunc and t_ifunc_now normally. If they wind up being
built with the same options as t_ifunc_norelro and
t_ifunc_norelro_now, so be it; easier to do it this way than to put
more conditionals into set lists.

Should resolve, e.g.:

/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/armv7--netbsdelf-eabihf-ld: warning: -z relro ignored
armv7--netbsdelf-eabihf-clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- t_ifunc ---
*** Failed target: t_ifunc
*** In directory: /home/source/ab/HEAD-llvm/src/tests/libexec/ld.elf_so
*** Failed commands:
${_MKTARGET_LINK}
=> @# " link " ld.elf_so/t_ifunc
${_CCLINK.${:Ut_ifunc}} ${_LDFLAGS.${:Ut_ifunc}} ${_LDSTATIC.${:Ut_ifunc}} -o ${.TARGET} ${OBJS.${:Ut_ifunc}} ${_PROGLDOPTS} ${_LDADD.${:Ut_ifunc}}
=> /home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/armv7--netbsdelf-eabihf-clang --sysroot=/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-dest -Wl,--fatal-warnings -Wl,--warn-shared-textrel -pie -o t_ifunc t_ifunc.o -Wl,-rpath-link,/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-dest/lib -L=/lib -Wl,-z,relro -Wl,-rpath,/usr/tests/libexec/ld.elf_so -lutil -latf-c
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${:Ut_ifunc}}
=> /home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/nbctfmerge -t -g -L VERSION -g -o t_ifunc t_ifunc.o


# 1.22 07-Jul-2024 riastradh

t_ifunc: Test with all combinations of {relro, bindnow}.

PR lib/57792


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.21 30-Jul-2023 riastradh

ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.


# 1.20 03-Jun-2023 lukem

adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.


# 1.19 02-Jun-2023 riastradh

ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10


# 1.18 02-Jun-2023 riastradh

ld.elf_so: Test another edge case of mismatched TLS models.

One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

XXX pullup-10


# 1.17 01-Jun-2023 riastradh

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10


# 1.16 01-Jun-2023 riastradh

ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10


# 1.15 31-May-2023 riastradh

ld.elf_so: Nix inadvertently committed private test program.


# 1.14 31-May-2023 riastradh

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.


# 1.13 31-May-2023 riastradh

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
# 1.12 30-May-2021 joerg

branches: 1.12.4;
Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

branches: 1.11.2;
Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

branches: 1.10.2;
clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.23 16-Jul-2024 riastradh

tests/libexec/ld.elf_so/t_ifunc: Handle MKRELRO=no.

Just build t_ifunc and t_ifunc_now normally. If they wind up being
built with the same options as t_ifunc_norelro and
t_ifunc_norelro_now, so be it; easier to do it this way than to put
more conditionals into set lists.

Should resolve, e.g.:

/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/armv7--netbsdelf-eabihf-ld: warning: -z relro ignored
armv7--netbsdelf-eabihf-clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- t_ifunc ---
*** Failed target: t_ifunc
*** In directory: /home/source/ab/HEAD-llvm/src/tests/libexec/ld.elf_so
*** Failed commands:
${_MKTARGET_LINK}
=> @# " link " ld.elf_so/t_ifunc
${_CCLINK.${:Ut_ifunc}} ${_LDFLAGS.${:Ut_ifunc}} ${_LDSTATIC.${:Ut_ifunc}} -o ${.TARGET} ${OBJS.${:Ut_ifunc}} ${_PROGLDOPTS} ${_LDADD.${:Ut_ifunc}}
=> /home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/armv7--netbsdelf-eabihf-clang --sysroot=/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-dest -Wl,--fatal-warnings -Wl,--warn-shared-textrel -pie -o t_ifunc t_ifunc.o -Wl,-rpath-link,/home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-dest/lib -L=/lib -Wl,-z,relro -Wl,-rpath,/usr/tests/libexec/ld.elf_so -lutil -latf-c
${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${OBJS.${:Ut_ifunc}}
=> /home/builds/ab/HEAD-llvm/evbarm-earmv7hf/202407141900Z-tools/bin/nbctfmerge -t -g -L VERSION -g -o t_ifunc t_ifunc.o


# 1.22 07-Jul-2024 riastradh

t_ifunc: Test with all combinations of {relro, bindnow}.

PR lib/57792


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.21 30-Jul-2023 riastradh

ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.


# 1.20 03-Jun-2023 lukem

adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.


# 1.19 02-Jun-2023 riastradh

ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10


# 1.18 02-Jun-2023 riastradh

ld.elf_so: Test another edge case of mismatched TLS models.

One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

XXX pullup-10


# 1.17 01-Jun-2023 riastradh

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10


# 1.16 01-Jun-2023 riastradh

ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10


# 1.15 31-May-2023 riastradh

ld.elf_so: Nix inadvertently committed private test program.


# 1.14 31-May-2023 riastradh

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.


# 1.13 31-May-2023 riastradh

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
# 1.12 30-May-2021 joerg

branches: 1.12.4;
Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

branches: 1.11.2;
Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

branches: 1.10.2;
clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.22 07-Jul-2024 riastradh

t_ifunc: Test with all combinations of {relro, bindnow}.

PR lib/57792


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.21 30-Jul-2023 riastradh

ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.


# 1.20 03-Jun-2023 lukem

adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.


# 1.19 02-Jun-2023 riastradh

ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10


# 1.18 02-Jun-2023 riastradh

ld.elf_so: Test another edge case of mismatched TLS models.

One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

XXX pullup-10


# 1.17 01-Jun-2023 riastradh

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10


# 1.16 01-Jun-2023 riastradh

ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10


# 1.15 31-May-2023 riastradh

ld.elf_so: Nix inadvertently committed private test program.


# 1.14 31-May-2023 riastradh

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.


# 1.13 31-May-2023 riastradh

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
# 1.12 30-May-2021 joerg

branches: 1.12.4;
Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

branches: 1.11.2;
Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

branches: 1.10.2;
clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.21 30-Jul-2023 riastradh

ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.


# 1.20 03-Jun-2023 lukem

adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.


# 1.19 02-Jun-2023 riastradh

ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10


# 1.18 02-Jun-2023 riastradh

ld.elf_so: Test another edge case of mismatched TLS models.

One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

XXX pullup-10


# 1.17 01-Jun-2023 riastradh

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10


# 1.16 01-Jun-2023 riastradh

ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10


# 1.15 31-May-2023 riastradh

ld.elf_so: Nix inadvertently committed private test program.


# 1.14 31-May-2023 riastradh

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.


# 1.13 31-May-2023 riastradh

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
# 1.12 30-May-2021 joerg

Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

branches: 1.11.2;
Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.20 03-Jun-2023 lukem

adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.


# 1.19 02-Jun-2023 riastradh

ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10


# 1.18 02-Jun-2023 riastradh

ld.elf_so: Test another edge case of mismatched TLS models.

One library defines a symbol and _doesn't_ use it, so it has no
indication of whether the symbol is for static TLS or dynamic TLS,
and then two other libraries use it in different ways.

XXX pullup-10


# 1.17 01-Jun-2023 riastradh

ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10


# 1.16 01-Jun-2023 riastradh

ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10


# 1.15 31-May-2023 riastradh

ld.elf_so: Nix inadvertently committed private test program.


# 1.14 31-May-2023 riastradh

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.


# 1.13 31-May-2023 riastradh

ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
# 1.12 30-May-2021 joerg

Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

branches: 1.11.2;
Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.12 30-May-2021 joerg

Drop explicit -msecure-plt, it's the default for both clang and gcc.


Revision tags: cjep_staticlib_x-base
# 1.11 22-Sep-2020 kamil

Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.11 22-Sep-2020 kamil

Add new RTLD test file for r_debug

New tests:
- self
- dlopen

Both check whether the r_debug structure seems to be well-formed, without
and with a dlopen(3) call.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.10 14-May-2019 christos

clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

branches: 1.9.6;
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()


# 1.10 14-May-2019 christos

clang ifunc's on powerpc require secure-plt.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.9 11-Jul-2017 joerg

Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This
functions are used for destructors of thread_local objects.

If a pending destructor exists, prevent unloading of shared objects.
Introduce __dl_cxa_refcount interface for this purpose. When the last
reference is gone and the object has been dlclose'd before, the
unloading is finalized.

Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists
on providing __cxa_thread_atexit as direct wrapper without further
patching.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.8 25-Aug-2014 joerg

branches: 1.8.8;
Add basic support for indirect functions. It allows providing a public
function symbol with an implementation choosen at run time.
Refactor calls to functions by address in ld.elf_so to create temporary
function descriptors on the stack, if the address is not leaked outside.

Limitations:
- no support for initialising static storage with function pointers
- no support for unnamed resolver functions

Inspired by FreeBSD's r228435 by kib@freebsd.org.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 03-Jul-2011 mrg

avoid building stuff that depends upon pic objects if MKPIC == no.


# 1.6 03-Jul-2011 mrg

only build the ld.elf_so tests if MKPIC != no.


# 1.5 25-Jun-2011 nonaka

PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.


Revision tags: cherry-xenmp-base
# 1.4 31-Mar-2011 joerg

Add initial regression test for ld.elf_so locking.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.3 24-Dec-2010 skrll

Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.


# 1.2 14-Dec-2010 skrll

Convert a couple of old regress tests to ATF.

Remove the regress/usr.bin/rtld/dlopen/dlopen.c test as well as it's
covered by existing ATF test(s).


Revision tags: matt-premerge-20091211
# 1.1 24-Sep-2009 pooka

add regression tests for dlinfo()