Re: CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
On Mon, Sep 11, 2023 at 12:27:25PM +1000, matthew green wrote: > "Rin Okuyama" writes: > > Module Name:src > > Committed By: rin > > Date: Mon Sep 11 01:54:18 UTC 2023 > > > > Modified Files: > > src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em > > elf.em > > > > Log Message: > > ld: Enable --copy-dt-needed-entries by default again > > thanks for fixing -lcurses. > > can we put this into bsd.*.mk instead? > > ie, if we want this, declare it explicitly, rather than > reply upon patched binutils? (this is eg, unfriendly to > EXTERNAL_TOOLCHAIN etc.) We (TNF) consider this the default a bug. Red Hat etc who've been pushing for this mess don't, for reasons that don't really make sense. Basically, the Linux toolchain folks decided that ELF should no longer be recursive except it still is for every use case were performance matters. Joerg
Re: CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
On 2023/09/11 11:27, matthew green wrote: "Rin Okuyama" writes: Module Name:src Committed By: rin Date: Mon Sep 11 01:54:18 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em elf.em Log Message: ld: Enable --copy-dt-needed-entries by default again thanks for fixing -lcurses. can we put this into bsd.*.mk instead? ie, if we want this, declare it explicitly, rather than reply upon patched binutils? (this is eg, unfriendly to EXTERNAL_TOOLCHAIN etc.) if it works, of course Thanks for your comment. Yeah, I feel this fix is too much also... I've found that FreeBSD uses ldscript to handle curses vs terminfo problem. I think we can resolve the problem in a similar manner. I've sent PR lib/57615 for this: http://gnats.netbsd.org/57615 Thanks, rin
re: CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
"Rin Okuyama" writes: > Module Name: src > Committed By: rin > Date: Mon Sep 11 01:54:18 UTC 2023 > > Modified Files: > src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em > elf.em > > Log Message: > ld: Enable --copy-dt-needed-entries by default again thanks for fixing -lcurses. can we put this into bsd.*.mk instead? ie, if we want this, declare it explicitly, rather than reply upon patched binutils? (this is eg, unfriendly to EXTERNAL_TOOLCHAIN etc.) if it works, of course .mrg.
CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
Module Name:src Committed By: rin Date: Mon Sep 11 01:54:18 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em elf.em Log Message: ld: Enable --copy-dt-needed-entries by default again Otherwise, terminfo(3) symbols referenced from curses(3)-based applications are not resolved, unless -lterminfo is explicitly specified. See, e.g., PR lib/57592 We had locally enabled this by default: http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/binutils/dist/ld/emultempl/elf.em#rev1.2 But this was lost during 2.39 merge. Thanks uwe@ for hints! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em \ src/external/gpl3/binutils/dist/ld/emultempl/armelf.em cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/ld/emultempl/elf.em Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em diff -u src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.8 src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.9 --- src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em:1.8 Sat Dec 24 20:17:07 2022 +++ src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em Mon Sep 11 01:54:18 2023 @@ -44,6 +44,8 @@ gld${EMULATION_NAME}_before_parse (void) ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); #endif /* not TARGET_ */ input_flags.dynamic = ${DYNAMIC_LINK-true}; + /* XXX For NetBSD, copy-dt-needed-entries by default. */ + input_flags.add_DT_NEEDED_for_dynamic = true; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; link_info.check_relocs_after_open_input = true; Index: src/external/gpl3/binutils/dist/ld/emultempl/armelf.em diff -u src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.8 src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.9 --- src/external/gpl3/binutils/dist/ld/emultempl/armelf.em:1.8 Sat Dec 24 20:17:07 2022 +++ src/external/gpl3/binutils/dist/ld/emultempl/armelf.em Mon Sep 11 01:54:18 2023 @@ -57,6 +57,8 @@ gld${EMULATION_NAME}_before_parse (void) ldfile_set_output_arch ("`echo ${ARCH}`", bfd_arch_unknown); #endif /* not TARGET_ */ input_flags.dynamic = ${DYNAMIC_LINK-true}; + /* XXX For NetBSD, copy-dt-needed-entries by default. */ + input_flags.add_DT_NEEDED_for_dynamic = true; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; link_info.check_relocs_after_open_input = true; Index: src/external/gpl3/binutils/dist/ld/emultempl/elf.em diff -u src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.3 src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.4 --- src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.3 Sat Dec 24 20:17:07 2022 +++ src/external/gpl3/binutils/dist/ld/emultempl/elf.em Mon Sep 11 01:54:18 2023 @@ -81,6 +81,8 @@ gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); input_flags.dynamic = ${DYNAMIC_LINK-true}; + /* XXX For NetBSD, copy-dt-needed-entries by default. */ + input_flags.add_DT_NEEDED_for_dynamic = true; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`; config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo true ; else echo false ; fi`; link_info.check_relocs_after_open_input = true;
CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
Module Name:src Committed By: rin Date: Mon Sep 11 01:54:18 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em elf.em Log Message: ld: Enable --copy-dt-needed-entries by default again Otherwise, terminfo(3) symbols referenced from curses(3)-based applications are not resolved, unless -lterminfo is explicitly specified. See, e.g., PR lib/57592 We had locally enabled this by default: http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/binutils/dist/ld/emultempl/elf.em#rev1.2 But this was lost during 2.39 merge. Thanks uwe@ for hints! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em \ src/external/gpl3/binutils/dist/ld/emultempl/armelf.em cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/ld/emultempl/elf.em Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
On Wed, Feb 18, 2015 at 03:05:44PM +, Joerg Sonnenberger wrote: Module Name: src Committed By: joerg Date: Wed Feb 18 15:05:44 UTC 2015 Modified Files: src/external/gpl3/binutils/dist/ld/emultempl: aarch64elf.em armelf.em Log Message: Apply elf32.em r1.8 to the corresponding sections of armelf.em and aarch64elf.em. Original commit message: Recursively add DT_NEEDED entries from shared libraries if symbols are used indirectly. This is more in line with the old GNU ld behavior, but not exactly the desired semantic. Patch from Martin Husemann. Please note that this needs a make clean in src/external/gpl3/binutils to be seen as the dependencies of the generated source files are incomplete. Joerg