https://sourceware.org/bugzilla/show_bug.cgi?id=34714

            Bug ID: 34714
           Summary: Change to default linker behavior of segment placement
                    affects Wine
           Product: binutils
           Version: 2.47
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: mike at cchtml dot com
  Target Milestone: ---

Created attachment 17062
  --> https://sourceware.org/bugzilla/attachment.cgi?id=17062&action=edit
Tarball with reproducer of wine 11.19 loader source

Commit of discussion:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=99600a4787910d4b1994b243473a7386dbee641d

Prior to binutils 2.47, Wine (https://www.winehq.org/) could link its
"wine-preloader" binary with its default arguments. Starting with 2.47 the link
now fails.

binutils 2.47 output:
gcc -m64 -o loader/wine-preloader loader/preloader.o loader/preloader_mac.o
-nostartfiles -nodefaultlibs -static \
  -Wl,-Ttext=0x7d7d00000000
loader/preloader.o: in function `wld_vsprintf':
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:700:(.text+0x2a6):
relocation truncated to fit: R_X86_64_PC32 against `.rodata'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:713:(.text+0x316):
relocation truncated to fit: R_X86_64_PC32 against `.rodata'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:706:(.text+0x402):
relocation truncated to fit: R_X86_64_PC32 against `.rodata'
loader/preloader.o: in function `map_so_lib':
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:1077:(.text+0xa3b):
relocation truncated to fit: R_X86_64_PC32 against `.LC9'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:1004:(.text+0xbc4):
relocation truncated to fit: R_X86_64_PC32 against `.LC6'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:942:(.text+0xbd5):
relocation truncated to fit: R_X86_64_PC32 against `.LC2'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:1007:(.text+0xbea):
relocation truncated to fit: R_X86_64_PC32 against `.LC7'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:949:(.text+0xbfb):
relocation truncated to fit: R_X86_64_PC32 against `.LC3'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:934:(.text+0xc0c):
relocation truncated to fit: R_X86_64_PC32 against `.LC1'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:931:(.text+0xc1d):
relocation truncated to fit: R_X86_64_PC32 against `.LC0'
/builddir/build/BUILD/wine-11.19-build/wine-11.19/loader/preloader.c:1151:(.text+0xc2b):
additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status

I will attach the Wine 11.19 (latest as of today) loader code setup to build in
a small reproducer so you do not have to compile the entire project.

Note: The person who helped me discover this issue was the original commit
author, Nick.

Is this linker change appropriate? Does it need to change or revert? Does Wine
need to change? Thanks for any comments.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to