Welcome, Guest. Please login or register.

Author Topic: Odd GCC linker errors  (Read 2186 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline MinuousTopic starter

Odd GCC linker errors
« on: September 13, 2022, 09:15:04 AM »
GCC seems to be always failing now when attempting to link OS4 object files together. No errors/warnings are produced during compilation, but it appears to be producing malformed object files because linking is giving nonsensical error messages such as:

mce.o: In function `no symbol':
:(.text+0x390): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 452 in mce.o to 112 in mce.o
mce.o: In function `no symbol':
:(.text+0x400): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 112 in mce.o to 172 in mce.o
mce.o: In function `i':
:(.text+0x4ac): multiple definition of `i'
mce.o::(.text+0x0): first defined here
ld: Warning: size of symbol `i' changed from 108 in mce.o to 172 in mce.o
mce.o: In function `i':
:(.text+0x610): multiple definition of `i'
mce.o::(.text+0x0): first defined here
ld: Warning: size of symbol `i' changed from 172 in mce.o to 156 in mce.o
mce.o: In function `i':
:(.text+0x6ac): multiple definition of `i'
mce.o::(.text+0x0): first defined here
ld: Warning: size of symbol `i' changed from 156 in mce.o to 32 in mce.o
mce.o: In function `':
:(.text+0x6cc): multiple definition of `'
mce.o::(.text+0x558): first defined here
ld: Warning: size of symbol `' changed from 184 in mce.o to 36 in mce.o
mce.o: In function `no symbol':
:(.text+0x6f0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 172 in mce.o to 52 in mce.o
mce.o: In function `no symbol':
:(.text+0x724): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o: In function `no symbol':
:(.text+0x758): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 52 in mce.o to 72 in mce.o
mce.o: In function `':
:(.text+0x7a0): multiple definition of `'
mce.o::(.text+0x558): first defined here
ld: Warning: size of symbol `' changed from 36 in mce.o to 72 in mce.o
mce.o: In function `no symbol':
:(.text+0x7e8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 72 in mce.o to 120 in mce.o
mce.o: In function `no symbol':
:(.text+0x860): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 120 in mce.o to 100 in mce.o
mce.o: In function `no symbol':
:(.text+0x8c4): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 100 in mce.o to 124 in mce.o
mce.o: In function `no symbol':
:(.text+0xd2c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 124 in mce.o to 192 in mce.o
mce.o: In function `no symbol':
:(.text+0xdec): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 192 in mce.o to 268 in mce.o
mce.o: In function `no symbol':
:(.text+0x10f0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 268 in mce.o to 236 in mce.o
mce.o: In function `no symbol':
:(.text+0x1270): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 236 in mce.o to 192 in mce.o
mce.o: In function `no symbol':
:(.text+0x1458): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 192 in mce.o to 104 in mce.o
mce.o: In function `no symbol':
:(.text+0x1588): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 104 in mce.o to 180 in mce.o
mce.o: In function `no symbol':
:(.text+0x163c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 180 in mce.o to 144 in mce.o
mce.o: In function `no symbol':
:(.text+0x16cc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o: In function `no symbol':
:(.text+0x17ec): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o: In function `':
:(.text+0x187c): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 572 in mce.o to 144 in mce.o
mce.o: In function `no symbol':
:(.text+0x190c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o: In function `no symbol':
:(.text+0x199c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 144 in mce.o to 320 in mce.o
mce.o: In function `no symbol':
:(.text+0x1adc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 320 in mce.o to 300 in mce.o
mce.o: In function `no symbol':
:(.text+0x1c08): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 300 in mce.o to 100 in mce.o
mce.o: In function `no symbol':
:(.text+0x1c6c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 100 in mce.o to 88 in mce.o
mce.o: In function `':
:(.text+0x1d98): multiple definition of `'
mce.o::(.text+0x558): first defined here
ld: Warning: size of symbol `' changed from 72 in mce.o to 212 in mce.o
mce.o: In function `¨':
:(.text+0x1ed0): multiple definition of `¨'
mce.o::(.text+0x1e6c): first defined here
ld: Warning: size of symbol `¨' changed from 100 in mce.o to 84 in mce.o
mce.o: In function `no symbol':
:(.text+0x1f8c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 88 in mce.o to 444 in mce.o
mce.o: In function `no symbol':
:(.text+0x2148): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 444 in mce.o to 44 in mce.o
mce.o: In function `no symbol':
:(.text+0x28a0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 44 in mce.o to 1584 in mce.o
mce.o: In function `':
:(.text+0x2ed0): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 144 in mce.o to 172 in mce.o
mce.o: In function `':
:(.text+0x3104): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 172 in mce.o to 936 in mce.o
mce.o: In function `no symbol':
:(.text+0x3854): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 1584 in mce.o to 56 in mce.o
mce.o: In function `no symbol':
:(.text+0x388c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 56 in mce.o to 216 in mce.o
mce.o: In function `':
:(.text+0x3964): multiple definition of `'
mce.o::(.text+0x2f7c): first defined here
ld: Warning: size of symbol `' changed from 392 in mce.o to 112 in mce.o
mce.o: In function `no symbol':
:(.text+0x3dcc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 216 in mce.o to 228 in mce.o
mce.o: In function `no symbol':
:(.text+0x3eb0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 228 in mce.o to 224 in mce.o
mce.o: In function `no symbol':
:(.text+0x3f90): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 224 in mce.o to 88 in mce.o
mce.o: In function `no symbol':
:(.text+0x3fe8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 88 in mce.o to 136 in mce.o
mce.o: In function `no symbol':
:(.text+0x4070): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 136 in mce.o to 88 in mce.o
mce.o: In function `no symbol':
:(.text+0x40c8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 88 in mce.o to 116 in mce.o
mce.o: In function `no symbol':
:(.text+0x413c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 116 in mce.o to 268 in mce.o
mce.o: In function `':
:(.text+0x4248): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 936 in mce.o to 120 in mce.o
mce.o: In function `no symbol':
:(.text+0x42c0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 268 in mce.o to 120 in mce.o
mce.o: In function `':
:(.text+0x43ac): multiple definition of `'
mce.o::(.text+0x558): first defined here
ld: Warning: size of symbol `' changed from 212 in mce.o to 92 in mce.o
mce.o: In function `':
:(.text+0x4408): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 120 in mce.o to 192 in mce.o
mce.o: In function `':
:(.text+0x4c4c): multiple definition of `'
mce.o::(.text+0x2f7c): first defined here
ld: Warning: size of symbol `' changed from 112 in mce.o to 868 in mce.o
mce.o: In function `no symbol':
:(.text+0x5f44): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 120 in mce.o to 396 in mce.o
mce.o: In function `no symbol':
:(.text+0x4fb0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 396 in mce.o to 3988 in mce.o
mce.o: In function `':
:(.text+0x60d0): multiple definition of `'
mce.o::(.text+0x2f7c): first defined here
ld: Warning: size of symbol `' changed from 868 in mce.o to 232 in mce.o
mce.o: In function `':
:(.text+0x61b8): multiple definition of `'
mce.o::(.text+0x2f7c): first defined here
ld: Warning: size of symbol `' changed from 232 in mce.o to 272 in mce.o
mce.o: In function `no symbol':
:(.text+0x62c8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 3988 in mce.o to 256 in mce.o
mce.o: In function `no symbol':
:(.text+0x63c8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 256 in mce.o to 216 in mce.o
mce.o: In function `no symbol':
:(.text+0x6968): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 216 in mce.o to 36 in mce.o
mce.o: In function `no symbol':
:(.text+0x698c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 36 in mce.o to 184 in mce.o
mce.o: In function `no symbol':
:(.text+0x6a44): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 184 in mce.o to 288 in mce.o
mce.o: In function `no symbol':
:(.text+0x6b64): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 288 in mce.o to 640 in mce.o
mce.o: In function `no symbol':
:(.text+0x6f68): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 640 in mce.o to 1020 in mce.o
mce.o: In function `no symbol':
:(.text+0x7910): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 1020 in mce.o to 1108 in mce.o
mce.o: In function `no symbol':
:(.text+0x7d64): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 1108 in mce.o to 768 in mce.o
mce.o: In function `no symbol':
:(.text+0x8064): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 768 in mce.o to 608 in mce.o
mce.o: In function `no symbol':
:(.text+0x84cc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 608 in mce.o to 268 in mce.o
mce.o: In function `no symbol':
:(.text+0x85d8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 268 in mce.o to 328 in mce.o
mce.o: In function `no symbol':
:(.text+0x8ecc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 328 in mce.o to 660 in mce.o
mce.o: In function `no symbol':
:(.text+0x9530): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 660 in mce.o to 732 in mce.o
mce.o: In function `no symbol':
:(.text+0x9a28): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 732 in mce.o to 956 in mce.o
mce.o: In function `no symbol':
:(.text+0xc470): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 956 in mce.o to 240 in mce.o
mce.o: In function `no symbol':
:(.text+0xc560): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 240 in mce.o to 4452 in mce.o
mce.o: In function `no symbol':
:(.text+0xdf34): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 4452 in mce.o to 3840 in mce.o
mce.o: In function `no symbol':
:(.text+0xee34): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 3840 in mce.o to 1804 in mce.o
mce.o: In function `no symbol':
:(.text+0xf540): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 1804 in mce.o to 3136 in mce.o
mce.o: In function `no symbol':
:(.text+0x10180): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 3136 in mce.o to 304 in mce.o
mce.o: In function `':
:(.text+0x102b0): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 192 in mce.o to 27676 in mce.o
mce.o:(.bss+0x531): multiple definition of `'
mce.o::(.text+0xaf0): first defined here
ld: Warning: size of symbol `' changed from 27676 in mce.o to 1 in mce.o
ld: Warning: type of symbol `' changed from 2 to 1 in mce.o
mce.o:(.data+0x126): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 304 in mce.o to 2 in mce.o
ld: Warning: type of symbol `' changed from 2 to 1 in mce.o
mce.o:(.data+0x128): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.data+0x20): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `' changed from 2 in mce.o to 4 in mce.o
mce.o:(.bss+0x840): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.data+0x12c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x2164): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x314): multiple definition of `h'
mce.o:(.data+0x1c): first defined here
mce.o:(.bss+0x10): multiple definition of `'
mce.o::(.text+0x558): first defined here
ld: Warning: size of symbol `' changed from 92 in mce.o to 4 in mce.o
ld: Warning: type of symbol `' changed from 2 to 1 in mce.o
mce.o:(.bss+0x14): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x30c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x31c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x216c): multiple definition of `-'
mce.o::(.text+0x1330): first defined here
ld: Warning: size of symbol `-' changed from 104 in mce.o to 4 in mce.o
ld: Warning: type of symbol `-' changed from 2 to 1 in mce.o
mce.o:(.bss+0xb8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x428): multiple definition of `
'
mce.o::(.text+0x1f24): first defined here
ld: Warning: size of symbol `
' changed from 104 in mce.o to 4 in mce.o
ld: Warning: type of symbol `
' changed from 2 to 1 in mce.o
mce.o:(.bss+0x498): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x49c): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x4a4): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x4ac): multiple definition of `-'
mce.o:(.bss+0x4a0): first defined here
mce.o:(.bss+0x4b4): multiple definition of `'
mce.o::(.text+0x558): first defined here
mce.o:(.bss+0x4b8): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x4c0): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x514): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
mce.o:(.bss+0x4cc): multiple definition of `no symbol'
mce.o::(.text+0x6c): first defined here
ld: Warning: size of symbol `Ä' changed from 14 in mce.o to 4 in mce.o
mce.o:(.bss+0x4): multiple definition of `'
mce.o::(.text+0x558): first defined here

etc. I did not use most of these identifiers even once let alone multiple times. These kind of errors are produced no matter which program I am trying to link, even programs that used to build fine. I did not make any changes to makefiles or other settings. I thought GCC may have become corrupted so reinstalled the SDK, but the problem persists.
« Last Edit: October 06, 2022, 11:23:44 PM by F0LLETT »
 

Offline Joloo

Re: Odd GCC linker errors
« Reply #1 on: September 13, 2022, 09:44:11 PM »
I've encountered such errors when the makefile was corrupt and missed the "-c" option to produce object files.
Check if the object files were really created - I'm in doubt of that.
 

Offline MinuousTopic starter

Re: Odd GCC linker errors
« Reply #2 on: September 13, 2022, 09:51:33 PM »
That doesn't seem to be the issue, the object files are being generated and the -c flag is present.
 

Offline walkero

Re: Odd GCC linker errors
« Reply #3 on: September 14, 2022, 10:52:36 AM »
Have you tried to compile one of the examples/gui sources, without using any makefile? Does it produce the same errors?
 

Offline MinuousTopic starter

Re: Odd GCC linker errors
« Reply #4 on: September 14, 2022, 04:10:52 PM »
I've now identified the bug; it is the WinUAE filesystem emulation. If the source files are in a host Windows (NTFS) directory, it fails. If instead a HDF is used, it succeeds. I will add a note to the Amiga Coding Guide ( http://amigan.1emu.net/releases/ami-code.txt ) about the issue. Thanks to Joloo and walkero for your help.
« Last Edit: September 14, 2022, 04:12:01 PM by Minuous »
 

Offline walkero

Re: Odd GCC linker errors
« Reply #5 on: September 14, 2022, 06:45:25 PM »
I am glad it was resolved and is working fine for you now. I didn't do much of help.
You got some quite useful stuff on that page. I will keep it in mind. Thank you for sharing it.
 

Offline Joloo

Re: Odd GCC linker errors
« Reply #6 on: September 14, 2022, 06:52:46 PM »
Quote
I've now identified the bug; it is the WinUAE filesystem emulation. If the source files are in a host Windows (NTFS) directory, it fails. If instead a HDF is used, it succeeds.

I can't reproduce it using MS Windows 8.1, WinUAE 4.9.1.0, AmigaOS3.0 up to and including AmigaOS3.9 and either gcc 3.3.0 or gcc 3.4.0.
But as you wrote, you run AmigaOS4 inside WinUAE - so a difference to my test environments. WinUAE is also running as a privileged process here - which could make a difference, but I'm not sure. I'll have to dig a little deeper, but not today.

Nonetheless, I'm glad you figured it out.


Quote
I will add a note to the Amiga Coding Guide ( http://amigan.1emu.net/releases/ami-code.txt ) about the issue.

I'll look at it - but there is too much information for me to read at the moment.
So much information, so little time... :-(
Known problem? ;-)
 

Offline Joloo

Re: Odd GCC linker errors
« Reply #7 on: September 16, 2022, 07:43:43 PM »
I have now done several tests in order to find out whether the bug you describe is caused by WinUAE or by the host operating system (Windows 8.x, 10).
It is not related to MS-Windows and the used file system (NTFS, FATxxx) - here all tests, regardless if WinUAE was fired up with administrative privileges or not, did not cause any issues (under AmigaOS3.x).
My best guess is that the issue is solely related to AmigaOS4.x, as I can't imagine that QEMU is the cause and no one ever spotted this strange behaviour before.

It would be interesting to know if other Linux tools that store binary data in big-endian format also suffer from this.


Kind regards.