[PATCH v6 00/14] Allow glibc to be built with _FORTIFY_SOURCE

Frederic Berat fberat@redhat.com
Thu Jul 6 13:41:33 GMT 2023


On Thu, Jul 6, 2023 at 3:15 PM Andreas Schwab <schwab@suse.de> wrote:

>
> https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:glibc/glibc/f/i586
>
> gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs
> -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,pack-relative-relocs
> -B/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/csu/
> -Wl,--version-script=/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc.map
> -Wl,-soname=libc.so.6 -Wl,-z,relro -Wl,-z,now -nostdlib -nostartfiles -e
> __libc_main
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/math
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/elf
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/dlfcn
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nss
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nis
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/rt
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/resolv
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/mathvec
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/support
> -L/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nptl
> -Wl,-rpath-link=/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/math:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/elf:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/dlfcn:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nss:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nis:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/rt:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/resolv:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/mathvec:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/support:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/nptl
> -o
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc.so
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/csu/abi-note.o
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc_pic.os.clean
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/elf/interp.os
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/elf/ld.so
> -lgcc
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/elf/sofini.os
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc_pic.os.clean:
> in function `__GI_memmove':
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/libio/../string/bits/string_fortified.h:36:
> undefined reference to `__GI___memmove_chk'
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc_pic.os.clean:
> in function `__GI_memmove':
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/string/../string/bits/string_fortified.h:36:
> undefined reference to `__GI___memmove_chk'
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/string/../string/bits/string_fortified.h:36:
> undefined reference to `__GI___memmove_chk'
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc_pic.os.clean:
> in function `__GI_memmove':
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/io/../string/bits/string_fortified.h:36:
> undefined reference to `__GI___memmove_chk'
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/io/../string/bits/string_fortified.h:36:
> undefined reference to `__GI___memmove_chk'
> /usr/lib/gcc/i586-suse-linux/13/../../../../i586-suse-linux/bin/ld:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc_pic.os.clean:/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/io/../string/bits/string_fortified.h:36:
> more undefined references to `__GI___memmove_chk' follow
> collect2: error: ld returned 1 exit status
> make[2]: *** [../Makerules:647:
> /home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/cc-base/libc.so]
> Error 1
> make[2]: Leaving directory
> '/home/abuild/rpmbuild/BUILD/glibc-2.37.9000.594.g5324d25842/elf'
> make[1]: *** [Makefile:484: elf/subdir_lib] Error 2
> make: *** [Makefile:9: all] Error 2
>
>
Hello,

Please open a ticket if not already done.

A reproduction scenario/environment would be nice to have too.


> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
>
>


More information about the Libc-alpha mailing list