AmigaLabs / binutils-gdb

binutils targeted for ppc-amigaos systems (AmigaOS NG like OS4.1).
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git
GNU General Public License v2.0
0 stars 0 forks source link

Native: Linker (ld) breaks shared indices(?) #21

Open raziel- opened 8 months ago

raziel- commented 8 months ago

So, i tested a full ScummVM build with binutils 2.40 and while it compiles fines it somehow breaks at linker stage:

LINK scummvm Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 4 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 5 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 6 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 7 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 3 (>= sh_info of 2)

The binary gets linked, but always ISI crashes

migthymax commented 1 week ago

Is this still a bug in binutils, or is that a bug, which was in ScummVM as mention here from you (and fixed in ScummVM): https://www.amigans.net/modules/newbb/viewtopic.php?post_id=150415#forumpost150415

raziel- commented 1 week ago

It is still a bug with the 2.40 ld

I still get LINK scummvm Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 4 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 5 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 6 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 7 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 3 (>= sh_info of 2)

This is what i used to compile the scummvm code (latest snapshot from today)

sh ./configure --enable-release --enable-plugins --disable-detection-full --disable-all-engines

You don't need to compile any engines, as the main program link will already bring up the errors

migthymax commented 1 week ago

Hallo Hubert Maier (Raziel),

der Name hört sich sehr deutsch an. :😉 Auch wenn mein Name sich nicht deutsch anhört, wohne aber schon fast mein ganzes Leben hier. Hatte aber in der Schule immer ne 5/6 in Deutsch, so schreiben ist teilweise immer noch Katastrophe.

Ich versuch mal dahinter zu steigen was das Problem mit binutils und ScummVM ist.

Grüße aus der Nähe von Darmstadt

Max

From: Hubert Maier @.> Date: Monday, 9. September 2024 at 16:11 To: AmigaLabs/binutils-gdb @.> Cc: migthymax @.>, Comment @.> Subject: Re: [AmigaLabs/binutils-gdb] Native: Linker (ld) breaks shared indices(?) (Issue #21)

It is still a bug with the 2.40 ld

I still get LINK scummvm Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libpng16.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libvpx.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libz.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libssl.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /SDK/local/newlib/lib/libcrypto.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 3 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 4 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 5 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 6 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libstdc++.so: .dynsym local symbol at index 7 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 2 (>= sh_info of 2) Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: /Development/Coding/SDK/gcc/bin/../lib/gcc/ppc-amigaos/11.3.0/../../../libssp.so: .dynsym local symbol at index 3 (>= sh_info of 2)

This is what i used to compile the scummvm code (latest snapshot from today)

sh ./configure --enable-release --enable-plugins --disable-detection-full --disable-all-engines

You don't need to compile any engines, as the main program link will already bring up the errors

— Reply to this email directly, view it on GitHubhttps://github.com/AmigaLabs/binutils-gdb/issues/21#issuecomment-2338236406, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOEVGDQ2VCRIRS27LREZPTTZVWUAPAVCNFSM6AAAAABN4UFAKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYGIZTMNBQGY. You are receiving this because you commented.Message ID: @.***>

raziel- commented 1 week ago

zoinks...

Die Welt ist ein Dorf 😀

Lass dir Zeit, hab nur noch heute am miggy die Möglichkeit was zu tun, dann wieder Arbeit.

Im November hab ich Urlaub, also bis dahin wär schon cool...

...und clib4 wär schon auch was...aber eins nach dem anderen...

Grüße zurück aus dem südlichsten Bayern

migthymax commented 1 week ago

Ja genau. Dachte die eMail geht nur an dich und wird hier nicht mit aufgenommen, so zurück auf english ;-)

Would it be possible to get the serial debug output when the crash happen even with enabled @SetEnv ELF.Debug 1@? Because google for the error, it only seems to be a warning https://stackoverflow.com/questions/59915966/unknown-gcc-linker-error-but-builds-sucessfully

Could be that our elf loader doesn't like warnings like these.

raziel- commented 1 week ago

which crash?

the one from the binary that was built with those warnings in place?

i could provide such, but I'm not sure it would help...at least the scummvm devs always tell me the crash logs hold no usable information and the culprits it points at were nearly always wrong in the end.

I've never heard of such a flag, where do i put/use it?

migthymax commented 1 week ago

If you ran scummvm from the shell just before that enter:

SetEnv ELF.Debug 1

Than on the serial port, the elf.library will send debug output, and even the crash of the ScummVM should appear there. Maybe compile ScummVm with -gstabs will give additional information about where the crash happens. If you don't have the output of the serial port captured by another computer, you need to use Sashimi (I think that's the name) to redirect the output to a shell.

raziel- commented 1 week ago

kk, give me a sec

raziel- commented 1 week ago

it goes on and on and on printing stuff on serial...the log will be dozens of megabytes if not more and it hasnt even crashed yet...you sure you want the log (if it ever stops that is)

migthymax commented 1 week ago

Of course. zip it and attached it here. If n ot possible, because of size limit, send it via wetranser, and copy the wetransfer link here.

raziel- commented 1 week ago

https://gofile.me/7rpRB/2epHDYOUE

Here you go, roughly 75 MB

raziel- commented 1 week ago

forgot to add...this is the debug build of scummvm running (-gstabs) and i waited for the crash to happen (dunno how much time went by after that where it simply recorded the ELF noise...because i was doing something else ;-)