#5 Make brickOS work with up-to-date Binutils

Max Bowsher

The last version of binutils that brickOS works with ATM
is 2.12 - i.e. rather old. There are 2 issues.

1) binutils-2.12.1 introduced a bug in its symbolsrec
code during a rewrite. FIXED as of 2.13.2.

2) Memory allocation was reworked in binutils-2.13. This
changed a mostly benign buffer overrun to a segfaulting
overrun. The problem is that binutils mishandles certain
targets (including h8300-coff) when outputing to srec.
The workaround is to compile to coff, and then objcopy
to symbolsrec (or someone keen could make makelx
read coff).

NB: As of binutils 2.13.2, the error condition is detected,
and binutils dies with:

h8300-hms-ld: cannot handle R_MEM_INDIRECT reloc
when using symbolsrec output

instead of segfaulting.

Some binutils person might fix this in a later release, but
at the moment, brickOS still won't build fully with latest

A patch to Makefile.user is attached.

Note: --oformat h8300-coff is used to override
in brickos.lds

Maybe genlds should be changed instead to not write
this line, but I leave that up to the maintainers.


  • Max Bowsher

    Max Bowsher - 2003-01-14


  • Stephen M. Moraco

    • assigned_to: nobody --> stephmo
  • Stephen M. Moraco

    • status: open --> closed-accepted
  • Stephen M. Moraco

    Logged In: YES

    Now in CVS, 1st appearing in brickos- test release


Log in to post a comment.