[Brooks' activity related to commit 99ea67573164637d633e8051eb0a5d52f1f9488e
looks likely for what changed the status: "lib{c,sys}: move auxargs more
firmly into libsys".]

On Feb 21, 2024, at 09:02, Mark Millard <mark...@yahoo.com> wrote:

> On Feb 21, 2024, at 08:38, Mark Millard <mark...@yahoo.com> wrote:
> 
>> Mark Johnston <markj_at_freebsd.org> wrote on
>> Date: Wed, 21 Feb 2024 13:33:43 UTC :
>> 
>>> On Wed, Feb 21, 2024 at 09:52:23AM +0000, hartmut.bra...@dlr.de wrote:
>>>> Hi,
>>>> 
>>>> I updated yesterday and now event a minimal program with
>>>> 
>>>> cc -fsanitize=address
>>>> 
>>>> produces
>>>> 
>>>> ld: error: undefined symbol: __elf_aux_vector
>>>>>>> referenced by sanitizer_linux_libcdep.cpp:950 
>>>>>>> (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
>>>>>>> sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive 
>>>>>>> /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a
>>>> cc: error: linker command failed with exit code 1 (use -v to see 
>>>> invocation)
>>>> 
>>>> I think this is caused by the libsys split.
>>> 
>>> I don't see any such problem on a system running 5f7ac491eef4, which
>>> includes the libsys split. Which compiler are you using, and which
>>> revision are you running?
>> 
>> Trivial to reproduce via pkgbase install/upgrade:
>> 
>> # uname -apKU
>> FreeBSD aarch64-main-pkgs 15.0-CURRENT FreeBSD 15.0-CURRENT 
>> main-n268410-445d3d227e68 GENERIC-NODEBUG arm64 aarch64 1500014 1500014
> 
> Gack: pkgbase does not have the kernel and world at the same place
> relative to git commits of source code. See my note from yesterday:
> 
> https://lists.freebsd.org/archives/freebsd-pkgbase/2024-February/000319.html
> 
> Looking at /usr/src/tests/sys/kern/sigsys.c in this pkgbse context
> shows the content from about 10 hours after 445d3d227e68's commit:
> 
> git: e53b83a849e3 - main - tests/sigsys: initialize parameter passed to 
> sysctlbyname() Gleb Smirnoff
> (CommitDate: 2024-02-20 22:37:45 +0000)
> 
> (Note: The next commit's source was not present.)
> 
> 
>> # more main.c
>> int main(void) { return 0; }
>> 
>> # cc -fsanitize=address main.c
>> ld: error: undefined symbol: __elf_aux_vector
>>>>> referenced by sanitizer_linux_libcdep.cpp:950 
>>>>> (/home/bapt/worktrees/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
>>>>>             sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive 
>>>>> /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-aarch64.a
>>>>> referenced by sanitizer_linux_libcdep.cpp:950 
>>>>> (/home/bapt/worktrees/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950)
>>>>>             sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive 
>>>>> /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-aarch64.a
>> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> I do not see the issue in my (somehwat older) personal builds:
> 
> # uname -apKU
> you have mail
> FreeBSD CA72-16Gp-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT #134 
> main-n268363-8b67c670a49b-dirty: Sat Feb 17 16:22:31 PST 2024     
> root@CA72-16Gp-ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA72
>  arm64 aarch64 1500014 1500014
> 
> (Here kernel and world match git hashes: 8b67c670a49b . But
> my personal builds have patches and other tailoring relative
> to the official git hash they are based on.)
> 

My guess is:

Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 22:44:35 UTC 
The branch main has been updated by brooks:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=99ea67573164637d633e8051eb0a5d52f1f9488e

commit 99ea67573164637d633e8051eb0a5d52f1f9488e
Author: Brooks Davis <bro...@freebsd.org>
AuthorDate: 2024-02-19 22:44:08 +0000
Commit: Brooks Davis <bro...@freebsd.org>
CommitDate: 2024-02-19 22:44:08 +0000

lib{c,sys}: move auxargs more firmly into libsys

Continue to filter the public interface (elf_aux_info()), but entierly
relocate the private interfaces (_elf_aux_info(),
__init_elf_aux_vector(), and __elf_aux_vector) to libsys.

This ensures that rtld updates the correct (only) copy of
__elf_aux_vector. After 968a18975adc9c2a619bb52aa2f009de99fc9e24
updates were confused and __getosreldate was failing, causing
the system to fall back to compat compat12 syscalls in some cases.

Return to explicitly linking libc to libsys and link libthr with libc
and libsys (in that order).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D43910
 . .

===
Mark Millard
marklmi at yahoo.com


Reply via email to