The NetBSD Project

CVS log for src/tests/libexec/ld.elf_so/Makefile

[BACK] Up to [cvs.NetBSD.org] / src / tests / libexec / ld.elf_so

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Jul 22 02:34:58 2024 UTC (4 months, 3 weeks ago) by riastradh
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
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}
...

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Jul 16 17:15:44 2024 UTC (4 months, 4 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3 lines
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

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jul 7 17:37:33 2024 UTC (5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +17 -3 lines
t_ifunc: Test with all combinations of {relro, bindnow}.

PR lib/57792

Revision 1.10.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 12:13:10 2023 UTC (16 months ago) by sborrill
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.10.2.1: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.2.1: +7 -1 lines
Pull up the following revisions(s) (requested by riastradh in ticket #1712):
	distrib/sets/lists/debug/mi:	revision 1.409 via patch
	distrib/sets/lists/tests/mi:	revision 1.1280 via patch
	libexec/ld.elf_so/Makefile:	revision 1.145-1.147 via patch
	libexec/ld.elf_so/hash.c:	revision 1.1 via patch
	libexec/ld.elf_so/hash.h:	revision 1.1 via patch
	libexec/ld.elf_so/symbol.c:	revision 1.74-1.76 via patch
	tests/libexec/ld.elf_so/Makefile:	revision 1.21 via patch
	tests/libexec/ld.elf_so/t_hash.c:	revision 1.1 via patch

ld.elf_so: Fix sysv elf hash on edge cases like `ZZZZZW9p' on LP64
platforms where long is 64-bit.

Revision 1.8.8.2: download - view: text, markup, annotated - select for diffs
Wed Aug 9 16:16:40 2023 UTC (16 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.8.8.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.8.1: +7 -1 lines
Pull up following revision(s) (requested by riastradh in ticket #1886):

	distrib/sets/lists/debug/mi			1.409 (patch)
	distrib/sets/lists/tests/mi			1.1280 (patch)
	libexec/ld.elf_so/Makefile			1.145-1.147 (patch)
	libexec/ld.elf_so/hash.c			1.1
	libexec/ld.elf_so/hash.h			1.1
	libexec/ld.elf_so/reloc.c			1.118 (patch)
	libexec/ld.elf_so/rtld.c			1.215 (patch)
	libexec/ld.elf_so/rtld.h			1.145,1.147 (patch)
	libexec/ld.elf_so/symbol.c			1.74-1.76 (patch)
	tests/libexec/ld.elf_so/Makefile		1.21 (patch)
	tests/libexec/ld.elf_so/t_hash.c		1.1

The SysV ABI specifies that the symbol hash function should return only 32
bits of hash. Unfortunately due to an implementation bu and the fact that
the return type is unsigned long which is 64 bits in LP64, this can fail
in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See:
	https://maskray.me/blog/2023-04-12-elf-hash-function

From Ed Maste @ FreeBSD:
	https://cgit.freebsd.org/src/commit/?id=29e3a06510823edbb91667d21f530d3ec778116d

Need to write Unit Tests for this.

Oops wrong mask.

ld.elf_so: Split SRCS onto multiple lines.
Makes updates easier.
No functional change intended.

ld.elf_so: Sort SRCS.
No functional change intended.

ld.elf_so: Split hash functions into a separate file.
This way we can test them in isolation.
No functional change intended.

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

Make sure the testing mechanism detects the traditional overflow bug.

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 4 12:55:46 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-9
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +15 -1 lines
Pull up following revision(s), all via patch,
(requested by riastradh in ticket #1699):

	distrib/sets/lists/tests/shl.mi: revision 1.14
	distrib/sets/lists/tests/shl.mi: revision 1.15
	distrib/sets/lists/tests/shl.mi: revision 1.16
	tests/libexec/ld.elf_so/helper_def_static/h_def_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.2
	libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.75
	distrib/sets/lists/tests/mi: revision 1.1265
	libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.36
	libexec/ld.elf_so/rtld.c: revision 1.214
	tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.1
	distrib/sets/lists/debug/mi: revision 1.400
	tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.2
	distrib/sets/lists/debug/mi: revision 1.401
	distrib/sets/lists/debug/mi: revision 1.402
	tests/libexec/ld.elf_so/helper_dso2/Makefile: revision 1.2
	distrib/sets/lists/debug/mi: revision 1.403
	tests/libexec/ld.elf_so/helper_symver_dso0/Makefile: revision 1.2
	libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.48
	distrib/sets/lists/debug/mi: revision 1.406
	tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile: revision 1.2
	libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.70
	libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.18
	tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/Makefile: revision 1.13
	libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.46
	libexec/ld.elf_so/rtld.h: revision 1.146
	tests/libexec/ld.elf_so/Makefile: revision 1.14
	distrib/sets/lists/debug/shl.mi: revision 1.306
	tests/libexec/ld.elf_so/Makefile: revision 1.15
	tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.1
	distrib/sets/lists/debug/shl.mi: revision 1.307
	tests/libexec/ld.elf_so/Makefile: revision 1.16
	tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.2
	distrib/sets/lists/debug/shl.mi: revision 1.308
	tests/libexec/ld.elf_so/Makefile: revision 1.17
	distrib/sets/lists/debug/shl.mi: revision 1.309
	tests/libexec/ld.elf_so/Makefile: revision 1.18
	tests/libexec/ld.elf_so/Makefile: revision 1.19
	libexec/ld.elf_so/tls.c: revision 1.16
	libexec/ld.elf_so/tls.c: revision 1.17
	libexec/ld.elf_so/tls.c: revision 1.18
	libexec/ld.elf_so/tls.c: revision 1.19
	tests/libexec/ld.elf_so/helper_onlydef_static/h_onlydef_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.2
	tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.2
	libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.50
	distrib/sets/lists/debug/shl.mi: revision 1.310
	libexec/ld.elf_so/README.TLS: revision 1.6
	distrib/sets/lists/debug/shl.mi: revision 1.311
	distrib/sets/lists/debug/shl.mi: revision 1.314
	tests/libexec/ld.elf_so/helper_dso3/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_symver_dso1/Makefile: revision 1.4
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.63
	tests/libexec/ld.elf_so/helper_def_dynamic/h_def_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.10
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.11
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.12
	libexec/ld.elf_so/map_object.c: revision 1.66
	tests/libexec/ld.elf_so/helper.mk: revision 1.1
	libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.57
	libexec/ld.elf_so/map_object.c: revision 1.67
	tests/libexec/ld.elf_so/helper_onlydef/h_onlydef.c: revision 1.1
	tests/libexec/ld.elf_so/helper_symver_dso2/Makefile: revision 1.4
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.3
	tests/libexec/ld.elf_so/helper_use_dynamic/h_use_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_abuse_static/h_abuse_static.c: revision 1.1
	libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.9
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.1
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.3
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.4
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.5
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.6
	libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.34
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.7
	libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.42
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.8
	libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.43
	libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.4
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.9
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_abuse_dynamic/h_abuse_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/h_onlyctor_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_static/h_onlyuse_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/h_onlyuse_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_dso1/Makefile: revision 1.2
	distrib/sets/lists/tests/shl.mi: revision 1.12
	distrib/sets/lists/tests/shl.mi: revision 1.13
	libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.44

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

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.
Now it's actually testing the problem.
ld.elf_so: Nix inadvertently committed private test program.
ld.elf_so: Fix set lists for MKDEBUG=yes builds with t_tls_extern.

ld.elf_so: Sprinkle tls debug messages.

ld.elf_so: Make tls alloc debug messages more detailed and greppable.

ld.elf_so: Test variations on PR toolchain/50277.

ld.elf_so: Test extern dynamic TLS too.

ld.elf_so: Factor out logic in TLS tests to make writing more easier.
No functional change intended.

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

ld.elf_so: Shorter test names.
No functional non-cosmetic change intended.

ld.elf_so: Separately test eager and lazy resolution of def tls ptr.
eager: before loading use library
lazy: after loading use library

Add recent ld.elf_so test helpers debug info
ld.elf_so: Add new files to debug/shl.mi.

ld.elf_so: tls_extern dynamic_defabuse_eager must xfail differently.
If a symbol has already been resolved as dynamic TLS, any library
that tries to use it as static TLS cannot be dlopened.

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.

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

ld.elf_so: Fix missing tab in debug/shl.mi in last change.

Fix interactions of initial-exec TLS model and dlopen

(1) If an initial-exec relocation was used for a non-local symbol
(i.e. the definition of the symbol is in a different DSO), the
computation of the static TLS offset used the wrong DSO.

This would effectively mean the wrong address was computed
(PR toolchain/50277, PR pkg/57445).
Fix this by forcing the computation of the correct DSO (the one defining
the symbol).
This code uses __UNCONST to avoid the vast interface changes for this
special case.

(2) If symbols from a DSO loaded via dlopen are used with both
global-dynamic/local-dynamic and initial-exec relocations AND
a initial-exec relocation was resolved first in a thread, a split brain
situation could exist where the dynamic relocations would use one memory
block (separate allocation) and the initial-exec relocations the static
per-thread TLS space.

(3) If the initial-exec relocation in (2) is seen after any thread has
already used a GD/LD allocation, bail out. Since IE relocations are used
only in the GOT, this will prevent the dlopen. This is a bit more
aggressive than necessary, but a full blown reference counting doesn't
seem to be justified.
Avoid using uninitialized variable "symnum" when building with DEBUG
enabled by borrowing the rdbg_symname() macro from arch/x86_64.
ld.elf_so: Sprinkle more debug messages on dlopen and error.

PR pkg/57445

Fix MKDEBUGLIB build by adding these installed files to the debug
set list.

One could argue that these files are not of any use, so why install
them?  I don't have a good argument either way, and this is (for
now) a simple work-around for PR bin/57455   Please feel free to
commit a different fix to avoid installing these files at all.

Fix markup of libh_ MKDEBUGLIB=yes only files

TLS variant I archs need to fudge the offset by the size of the TCB.
tests/libexec/ld.elf_so: Fix helper library makefiles.
1. Consolidate logic into a single helper.mk to reduce duplication.
2. Set NO* variables, not MK* variables which are reserved for user.
3. Avoid eager X!= in favour of lazy ${X:sh}.
4. Mark _g.a set list entries obsolete.  Never should've been built!
PR misc/57462

Revision 1.12.4.2: download - view: text, markup, annotated - select for diffs
Tue Aug 1 17:03:53 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Diff to: previous 1.12.4.1: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.4.1: +7 -1 lines
Pull up following revision(s) (requested by riastradh in ticket #300):

	libexec/ld.elf_so/rtld.h: revision 1.145
	libexec/ld.elf_so/symbol.c: revision 1.74
	libexec/ld.elf_so/rtld.h: revision 1.147
	libexec/ld.elf_so/symbol.c: revision 1.75
	libexec/ld.elf_so/symbol.c: revision 1.76
	tests/libexec/ld.elf_so/t_hash.c: revision 1.1
	libexec/ld.elf_so/Makefile: revision 1.145
	libexec/ld.elf_so/Makefile: revision 1.146
	libexec/ld.elf_so/Makefile: revision 1.147
	libexec/ld.elf_so/reloc.c: revision 1.118
	distrib/sets/lists/tests/mi: revision 1.1280
	libexec/ld.elf_so/rtld.c: revision 1.215
	tests/libexec/ld.elf_so/Makefile: revision 1.21
	libexec/ld.elf_so/hash.c: revision 1.1
	libexec/ld.elf_so/hash.h: revision 1.1
	distrib/sets/lists/debug/mi: revision 1.409

The SysV ABI specifies that the symbol hash function should return only 32
bits of hash. Unfortunately due to an implementation bug and the fact that
the return type is unsigned long which is 64 bits in LP64, this can fail
in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See:
    "https://maskray.me/blog/2023-04-12-elf-hash-function
From Ed Maste @ FreeBSD:
    https://cgit.freebsd.org/src/commit/?id=29e3a06510823edbb91667d21f530d3ec778116d

Need to write Unit Tests for this.

Oops wrong mask.

ld.elf_so: Split SRCS onto multiple lines.
Makes updates easier.
No functional change intended.

ld.elf_so: Sort SRCS.
No functional change intended.

ld.elf_so: Split hash functions into a separate file.
This way we can test them in isolation.
No functional change intended.

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

Make sure the testing mechanism detects the traditional overflow bug.

Revision 1.12.4.1: download - view: text, markup, annotated - select for diffs
Tue Aug 1 16:34:58 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-10
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +15 -1 lines
Pull up following revision(s) (requested by riastradh in ticket #297):

	distrib/sets/lists/tests/shl.mi: revision 1.14
	distrib/sets/lists/tests/shl.mi: revision 1.15
	distrib/sets/lists/tests/shl.mi: revision 1.16
	tests/libexec/ld.elf_so/helper_def_static/h_def_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_def_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_static/Makefile: revision 1.2
	libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.75
	distrib/sets/lists/tests/mi: revision 1.1265
	libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.36
	libexec/ld.elf_so/rtld.c: revision 1.214
	tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.1
	distrib/sets/lists/debug/mi: revision 1.400
	tests/libexec/ld.elf_so/helper_onlydef_static/Makefile: revision 1.2
	distrib/sets/lists/debug/mi: revision 1.401
	distrib/sets/lists/debug/mi: revision 1.402
	tests/libexec/ld.elf_so/helper_dso2/Makefile: revision 1.2
	distrib/sets/lists/debug/mi: revision 1.403
	tests/libexec/ld.elf_so/helper_symver_dso0/Makefile: revision 1.2
	libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.48
	distrib/sets/lists/debug/mi: revision 1.406
	tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_use_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_ifunc_dso/Makefile: revision 1.2
	libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.70
	libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.18
	tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_abuse_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/Makefile: revision 1.13
	libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.46
	libexec/ld.elf_so/rtld.h: revision 1.146
	tests/libexec/ld.elf_so/Makefile: revision 1.14
	distrib/sets/lists/debug/shl.mi: revision 1.306
	tests/libexec/ld.elf_so/Makefile: revision 1.15
	tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.1
	distrib/sets/lists/debug/shl.mi: revision 1.307
	tests/libexec/ld.elf_so/Makefile: revision 1.16
	tests/libexec/ld.elf_so/helper_abuse_static/Makefile: revision 1.2
	distrib/sets/lists/debug/shl.mi: revision 1.308
	tests/libexec/ld.elf_so/Makefile: revision 1.17
	distrib/sets/lists/debug/shl.mi: revision 1.309
	tests/libexec/ld.elf_so/Makefile: revision 1.18
	tests/libexec/ld.elf_so/Makefile: revision 1.19
	libexec/ld.elf_so/tls.c: revision 1.16
	libexec/ld.elf_so/tls.c: revision 1.17
	libexec/ld.elf_so/tls.c: revision 1.18
	libexec/ld.elf_so/tls.c: revision 1.19
	tests/libexec/ld.elf_so/helper_onlydef_static/h_onlydef_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/h_use_static.c: revision 1.2
	tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_def_static/Makefile: revision 1.2
	libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.50
	distrib/sets/lists/debug/shl.mi: revision 1.310
	libexec/ld.elf_so/README.TLS: revision 1.6
	distrib/sets/lists/debug/shl.mi: revision 1.311
	distrib/sets/lists/debug/shl.mi: revision 1.314
	tests/libexec/ld.elf_so/helper_dso3/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_symver_dso1/Makefile: revision 1.4
	libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.63
	tests/libexec/ld.elf_so/helper_def_dynamic/h_def_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlydef/Makefile: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.10
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.11
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.12
	libexec/ld.elf_so/map_object.c: revision 1.66
	tests/libexec/ld.elf_so/helper.mk: revision 1.1
	libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.57
	libexec/ld.elf_so/map_object.c: revision 1.67
	tests/libexec/ld.elf_so/helper_onlydef/h_onlydef.c: revision 1.1
	tests/libexec/ld.elf_so/helper_symver_dso2/Makefile: revision 1.4
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_use_static/Makefile: revision 1.3
	tests/libexec/ld.elf_so/helper_use_dynamic/h_use_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_abuse_static/h_abuse_static.c: revision 1.1
	libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.9
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.1
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.3
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.4
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.5
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.6
	libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.34
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.7
	libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.42
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.8
	libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.43
	libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.4
	tests/libexec/ld.elf_so/t_tls_extern.c: revision 1.9
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/Makefile: revision 1.2
	tests/libexec/ld.elf_so/helper_abuse_dynamic/h_abuse_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyctor_dynamic/h_onlyctor_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_static/h_onlyuse_static.c: revision 1.1
	tests/libexec/ld.elf_so/helper_onlyuse_dynamic/h_onlyuse_dynamic.c: revision 1.1
	tests/libexec/ld.elf_so/helper_dso1/Makefile: revision 1.2
	distrib/sets/lists/tests/shl.mi: revision 1.12
	distrib/sets/lists/tests/shl.mi: revision 1.13
	libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.44
	(all via patch)

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

ld.elf_so: Fix extern TLS test to match PR toolchain/50277.
Now it's actually testing the problem.
ld.elf_so: Nix inadvertently committed private test program.
ld.elf_so: Fix set lists for MKDEBUG=yes builds with t_tls_extern.

ld.elf_so: Sprinkle tls debug messages.

ld.elf_so: Make tls alloc debug messages more detailed and greppable.

ld.elf_so: Test variations on PR toolchain/50277.

ld.elf_so: Test extern dynamic TLS too.

ld.elf_so: Factor out logic in TLS tests to make writing more easier.
No functional change intended.

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

ld.elf_so: Shorter test names.
No functional non-cosmetic change intended.

ld.elf_so: Separately test eager and lazy resolution of def tls ptr.
eager: before loading use library
lazy: after loading use library

Add recent ld.elf_so test helpers debug info
ld.elf_so: Add new files to debug/shl.mi.

ld.elf_so: tls_extern dynamic_defabuse_eager must xfail differently.
If a symbol has already been resolved as dynamic TLS, any library
that tries to use it as static TLS cannot be dlopened.

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.

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

ld.elf_so: Fix missing tab in debug/shl.mi in last change.

Fix interactions of initial-exec TLS model and dlopen
(1) If an initial-exec relocation was used for a non-local symbol
(i.e. the definition of the symbol is in a different DSO), the
computation of the static TLS offset used the wrong DSO.
This would effectively mean the wrong address was computed
(PR toolchain/50277, PR pkg/57445).
Fix this by forcing the computation of the correct DSO (the one defining
the symbol).
This code uses __UNCONST to avoid the vast interface changes for this
special case.
(2) If symbols from a DSO loaded via dlopen are used with both
global-dynamic/local-dynamic and initial-exec relocations AND
a initial-exec relocation was resolved first in a thread, a split brain
situation could exist where the dynamic relocations would use one memory
block (separate allocation) and the initial-exec relocations the static
per-thread TLS space.
(3) If the initial-exec relocation in (2) is seen after any thread has
already used a GD/LD allocation, bail out. Since IE relocations are used
only in the GOT, this will prevent the dlopen. This is a bit more
aggressive than necessary, but a full blown reference counting doesn't
seem to be justified.
Avoid using uninitialized variable "symnum" when building with DEBUG
enabled by borrowing the rdbg_symname() macro from arch/x86_64.
ld.elf_so: Sprinkle more debug messages on dlopen and error.
PR pkg/57445
Fix MKDEBUGLIB build by adding these installed files to the debug
set list.
XXX
One could argue that these files are not of any use, so why install
them?  I don't have a good argument either way, and this is (for
now) a simple work-around for PR bin/57455   Please feel free to
commit a different fix to avoid installing these files at all.
Fix markup of libh_ MKDEBUGLIB=yes only files
TLS variant I archs need to fudge the offset by the size of the TCB.
tests/libexec/ld.elf_so: Fix helper library makefiles.
1. Consolidate logic into a single helper.mk to reduce duplication.
2. Set NO* variables, not MK* variables which are reserved for user.
3. Avoid eager X!= in favour of lazy ${X:sh}.
4. Mark _g.a set list entries obsolete.  Never should've been built!
PR misc/57462

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Jul 30 09:22:02 2023 UTC (16 months, 2 weeks ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -1 lines
ld.elf_so: Add some known-answer tests for hash functions.

Make sure the testing mechanism detects the traditional overflow bug.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Jun 3 21:31:47 2023 UTC (18 months, 1 week ago) by lukem
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -2 lines
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.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Jun 2 19:09:11 2023 UTC (18 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -1 lines
ld.elf_so: Test dynamic-then-static abuse via ctor.

XXX pullup-10

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Jun 2 19:08:48 2023 UTC (18 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -1 lines
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

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:26:40 2023 UTC (18 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -1 lines
ld.elf_so: Test TLS abuse of static def, dynamic use and vice versa.

XXX pullup-10

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Jun 1 20:50:18 2023 UTC (18 months, 1 week ago) by riastradh
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -1 lines
ld.elf_so: Test extern dynamic TLS too.

XXX pullup-10

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed May 31 01:06:43 2023 UTC (18 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +1 -4 lines
ld.elf_so: Nix inadvertently committed private test program.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed May 31 00:46:11 2023 UTC (18 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -1 lines
ld.elf_so: Fix extern TLS test to match PR toolchain/50277.

Now it's actually testing the problem.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed May 31 00:18:44 2023 UTC (18 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -1 lines
ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.

XXX pullup-10

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:23 2021 UTC (3 years, 6 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +1 -2 lines
sync with head

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun May 30 02:26:51 2021 UTC (3 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: netbsd-10-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Branch point for: netbsd-10
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -2 lines
Drop explicit -msecure-plt, it's the default for both clang and gcc.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Sep 22 01:09:32 2020 UTC (4 years, 2 months ago) by kamil
Branches: MAIN
CVS tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -1 lines
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 1.9.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:08 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +2 -1 lines
Sync with HEAD

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue May 14 19:07:07 2019 UTC (5 years, 7 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp
Branch point for: netbsd-9
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -1 lines
clang ifunc's on powerpc require secure-plt.

Revision 1.8.8.1: download - view: text, markup, annotated - select for diffs
Tue Aug 29 09:43:16 2017 UTC (7 years, 3 months ago) by bouyer
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -3 lines
Pull up following revision(s) (requested by joerg in ticket #127):
	tests/libexec/ld.elf_so/h_thread_local_dtor.c: revision 1.1
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/c++config.h: revision 1.14
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/c++config.h: revision 1.17
	lib/libc/stdlib/atexit.h: file removal
	lib/libc/stdlib/exit.c: revision 1.16
	external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h: revision 1.8
	lib/libc/stdlib/exit.c: revision 1.17
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/c++config.h: revision 1.14
	distrib/sets/lists/debug/shl.mi: revision 1.178
	external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/c++config.h: revision 1.21
	distrib/sets/lists/debug/shl.mi: revision 1.179
	distrib/sets/lists/debug/mi: revision 1.219
	lib/libpthread/pthread.c: revision 1.150
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/c++config.h: revision 1.14
	libexec/ld.elf_so/symbols.map: revision 1.2
	include/dlfcn.h: revision 1.25
	external/gpl3/gcc/lib/libstdc++-v3/arch/arm/c++config.h: revision 1.21
	external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h: revision 1.23
	external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h: revision 1.18
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/c++config.h: revision 1.14
	external/gpl3/gcc/lib/libstdc++-v3/arch/earm/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/c++config.h: revision 1.5
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/c++config.h: revision 1.14
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/c++config.h: revision 1.17
	distrib/sets/lists/tests/mi: revision 1.755
	external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/i386/c++config.h: revision 1.20
	external/gpl3/gcc/lib/libstdc++-v3/arch/vax/c++config.h: revision 1.21
	external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/c++config.h: revision 1.21
	external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/c++config.h: revision 1.20
	lib/libc/dlfcn/dlfcn_elf.c: revision 1.14
	tests/libexec/ld.elf_so/t_thread_local_dtor.sh: revision 1.1
	tests/lib/libpthread/t_thread_local_dtor.sh: revision 1.1
	lib/libc/stdlib/Makefile.inc: revision 1.93
	lib/libc/include/atexit.h: revision 1.1
	lib/libc/include/atexit.h: revision 1.2
	external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/c++config.h: revision 1.14
	distrib/sets/lists/debug/shl.mi: revision 1.180
	external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/c++config.h: revision 1.14
	external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/c++config.h: revision 1.14
	lib/libc/stdlib/cxa_thread_atexit.c: revision 1.1
	tests/libexec/ld.elf_so/helper_dso3/h_helper_dso3.cpp: revision 1.1
	tests/libexec/ld.elf_so/helper_dso3/Makefile: revision 1.1
	external/gpl3/gcc/lib/libstdc++-v3/arch/riscv64/c++config.h: revision 1.5
	libexec/ld.elf_so/rtld.c: revision 1.185
	external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/c++config.h: revision 1.19
	external/gpl3/gcc/lib/libstdc++-v3/arch/riscv32/c++config.h: revision 1.5
	external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/c++config.h: revision 1.15
	external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/c++config.h: revision 1.21
	external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/c++config.h: revision 1.12
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/c++config.h: revision 1.14
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/c++config.h: revision 1.15
	external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/c++config.h: revision 1.19
	tests/libexec/ld.elf_so/Makefile: revision 1.9
	external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/c++config.h: revision 1.20
	external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/c++config.h: revision 1.14
	tests/lib/libpthread/h_thread_local_dtor.cpp: revision 1.1
	distrib/sets/lists/tests/shl.mi: revision 1.11
	tests/lib/libpthread/Makefile: revision 1.13
	libexec/ld.elf_so/rtld.h: revision 1.129
	external/gpl3/gcc/lib/libstdc++-v3/arch/or1k/c++config.h: revision 1.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.
Fix filename of new debug file
Add misising DEBUGLIB file
Avoid common declaration.
Drop TLS variant checks, emutls is enough for VAX and Sun2.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Jul 11 15:21:36 2017 UTC (7 years, 5 months ago) by joerg
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, 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, perseant-stdc-iso10646-base, perseant-stdc-iso10646
Branch point for: phil-wifi
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -3 lines
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 1.8: download - view: text, markup, annotated - select for diffs
Mon Aug 25 20:40:53 2014 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, netbsd-8-base, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +10 -2 lines
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 1.7: download - view: text, markup, annotated - select for diffs
Sun Jul 3 15:28:25 2011 UTC (13 years, 5 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -3 lines
avoid building stuff that depends upon pic objects if MKPIC == no.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Jul 3 06:46:49 2011 UTC (13 years, 5 months ago) by mrg
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -1 lines
only build the ld.elf_so tests if MKPIC != no.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Jun 25 05:45:12 2011 UTC (13 years, 5 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +23 -4 lines
PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Thu Mar 31 23:34:47 2011 UTC (13 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -0 lines
Add initial regression test for ld.elf_so locking.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Dec 24 12:41:43 2010 UTC (13 years, 11 months ago) by skrll
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -0 lines
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.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Dec 14 05:57:32 2010 UTC (14 years ago) by skrll
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
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 1.1: download - view: text, markup, annotated - select for diffs
Thu Sep 24 21:33:45 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: matt-premerge-20091211
add regression tests for dlinfo()

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>