aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-01-17 07:22:04 +0800
committerH.J. Lu <hjl.tools@gmail.com>2025-01-17 14:25:28 +0800
commitd7a3c9e650240e9e1c8e66e9099dc2880840a919 (patch)
tree935eb57555ef95d6c7c3ec0af76a240dcf3975bc /libctf
parentb565ac119bdf8ed857cfa1352ddc732ccdac7b66 (diff)
downloadbinutils-d7a3c9e650240e9e1c8e66e9099dc2880840a919.zip
binutils-d7a3c9e650240e9e1c8e66e9099dc2880840a919.tar.gz
binutils-d7a3c9e650240e9e1c8e66e9099dc2880840a919.tar.bz2
ld: Load the object only section when opening the mixed object file
Load the object only section when opening the mixed object file, instead of loading it after all other input files have been loaded. This fixed .../ld/collect-ld: /tmp/ccZAoUIW.obj-only.o: in function `main': .../ld/testsuite/ld-plugin/lto-10a.c:4: multiple definition of `main'; /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o):(.text.startup+0x0): first defined here .../ld/collect-ld: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o):(.text.startup+0xc5): undefined reference to `WinMain' collect2: error: ld returned 1 exit status ... FAIL: LTO 10 for x86_64-w64-mingw32 so that mixing LTO and non-LTO relocatable files for "ld -r" works for both ELF and non-ELF platforms. * ld.texi: Remove "On ELF platforms" from documentation of mixing LTO and non-LTO relocatable files for "ld -r". * ldlang.c (cmdline_load_object_only_section): New. (cmdline_check_object_only_section): Call it. * testsuite/ld-plugin/lto.exp: Enable mixed LTO and non-LTO relocatable output tests for all. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'libctf')
0 files changed, 0 insertions, 0 deletions