[gccsdk] GCCSDK 4.1.2 Rel 1 preparation

John Tytgat John.Tytgat at aaug.net
Wed Apr 27 16:06:19 PDT 2011

In message <036d9fca51.belles at ivy.at.home>
          Jillian and Christopher Martin <belles at internode.on.net> wrote:

> John,
> I have discovered serious bugs in asasm regarding ELF relocations and
> am currently working on a fix. I'm not sure that it is a show-stopper
> because it may be that no-one else is using asasm to reassemble old
> code for use with GCC 4. But I need asasm for ARMv7 builds of
> OpenVector & Co and the bugs have made it impossible.

Much appreciated feedback.  I'm not so surprised there are ELF issues
in asasm as this didn't get any serious testing so far.  The testqueue
in asasm is using the AOF output to compare.  In the end we'll need a
testqueue using ELF output and tests on its relocations (in fact, we'll
need it for AOF as well).

FYI, a lot of work was done on asasm to improve its usability but we're
still not there yet for as full replacement for ObjAsm compiling the
RISC OS code base (which I think is the hardest case to crack).  I took
the decision to stay with the one-pass assembling approach but start now
to realise this will result in additional complexity not worth the
trouble so a two-pass assembler approach is probably the way foreward
for a future version of asasm.

> I have been using RISC OS for this work, but asasm from the 4.1.1
> release was so unusable that I installed the 4.6 trunk on an old
> laptop running Ubuntu. I was able to build !GCC 4.6 but couldn't work
> out how to do anything more.

FYI, the native RISC OS GCC compiler build for trunk/gcc4 is not yet

But if you want to only build & develop asasm, you can do this on your
Ubuntu (make sure you have the cross-compiler installed at

    $ svn co svn://svn.riscos.info/gccsdk/trunk/gcc4/riscos/asasm
    $ cd asasm
    $ autoreconf --install
    $ mkdir ../build_ro
    $ cd ../build_ro
    $ ../asasm/configure --host=arm-unknown-riscos
    $ make
    ...RISC OS binary is ./asasm (without the ELF filetype)
    $ make

    When you're happy with your changes, you can run the testqueue to make
    sure you don't have any regressions:

    $ mkdir ../build_native
    $ cd ../build_native
    $ ../asasm/configure
    $ make
    ...the host (i.e. Linux) native binary is ./asasm
    $ cd ../asasm/regression
    $ make AS=../../build_native/asasm
    ... you should see "*** All tests were OK (do 'make clean' if you want
        to re-do them)" otherwise more fixing is needed :)

On the longer run I would like to use libelf to replace our ELF code
in asasm and also libdwarf to include debug information.  And that would
mean above build instructions won't be sufficient.  But by that time,
perhaps we can make a little script to build asasm and its required
libraries for standalone development of asasm.

> So I dragged the asasm sources across to
> RISC OS and started working there. I may have fixed the problem now (I
> will soon try another OpenVector build) but it will take me longer to
> figure out how to migrate my changes back into the GCCSDK and into the
> appropriate SVN branch. I am still trying to get my head around the
> entire 4.6 layout, let alone the branches.

Hope the above helps you.  Feel free to do your changes against trunk.
I'll merge to branches/release_4_1_2 whatever is needed.

> For what it's worth, I'm also part-way through converting the
> DigitalRenderer BASIC into Objasm format. As soon as I have dealt with
> asasm, I'll finish the DigitalRenderer job.

Much appreciated again.  Looking forward to that.

John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven

More information about the gcc mailing list