bebbo / binutils-gdb

Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git
GNU General Public License v2.0
3 stars 3 forks source link

-noixemul -msmall-code -resident crash for bigger programs #4

Closed githubaf closed 5 years ago

githubaf commented 5 years ago

When I compile the attached simple example with

~/opt/m68k-amigaos_19Dec18/bin/m68k-amigaos-gcc test.c -noixemul -msmall-code -resident -o test

the resulting executable crashes without printing anything. When I leave out either -msmall-code or -resident the program works.

test.tar.gz

bebbo commented 5 years ago

The result: ___datadata_relocs is pointing to the wrong location.

githubaf commented 5 years ago

The provided example still crashes here...

mheyer32 commented 5 years ago

The lastest toolchain won't compile on my machine anymore:

/matze/amigatoolchain/amiga-gcc/projects/binutils/bfd/amigaoslink.c -o amigaoslink.o
/home/matze/amigatoolchain/amiga-gcc/projects/binutils/bfd/amigaoslink.c: In function ‘insert_long_jumps’:
/home/matze/amigatoolchain/amiga-gcc/projects/binutils/bfd/amigaoslink.c:302:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for (unsigned ri = 0; ri < r_datadata_count; ++ri)
     ^
/home/matze/amigatoolchain/amiga-gcc/projects/binutils/bfd/amigaoslink.c:302:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
/home/matze/amigatoolchain/amiga-gcc/projects/binutils/bfd/amigaoslink.c:312:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
     for (unsigned oi = 0; oi < abfd->symcount; ++oi)
     ^
Makefile:1607: recipe for target 'amigaoslink.lo' failed
bebbo commented 5 years ago

builds again

mheyer32 commented 5 years ago

Yep!

githubaf commented 5 years ago

Tested sucessfully with latest commit (23Dec18)