[PATCH] bfd: tweak SET_ARCH_MACH of aout-cris.c

Hans-Peter Nilsson hp@bitrange.com
Thu May 7 19:52:53 GMT 2020


On Thu, 7 May 2020, Gunther Nikl wrote:
> Hans-Peter Nilsson <hp@bitrange.com> wrote:
> > On Wed, 6 May 2020, Gunther Nikl wrote:
> > > BTW, I didn't realize until recently that aoutx.h can be used
> > > outside of aout32.c/aout64.c. However I was surprised to see that
> > > aout-cris.c does include aout32.c directly. I guess that was a
> > > deliberate decision?
> >
> > I honestly can't remember.  Doesn't it match the pattern of
> > other aout-*.c files?  ...hm, not many around.  Oh wait: I think
> > something was sufficiently different that I couldn't use
> > aout32.c, perhaps the reloc format.
>
> Oh, that much I understood. I meant that aout-cris.c does
>
>   #include "aout32.c"
>
> when I expected
>
>   #include "aoutx.h"

Looks like I misremembered.  I *guess* I thought "inheriting"
from the more specific "class" (aout32.c) was cleaner than
including aoutx.h.  I still do. :)

> Since I was grepping for the header the result list did not include
> aout-cris.c.
>
> A last question if you don't mind: there is a comment in set_sizes in
> front of line setting the relocation entry size. Since you had to add
> a case of bfd_arch_cris to "NAME (aout, machine_type)" adding such a
> case to "NAME (aout, set_arch_mach)" to use the generic set_sizes does
> not sound that bad. At least for me the machine_type function is also
> about target-specific things.

I didn't see a question there.  Were the comments unclear?
I think I understand them.

brgds, H-P


More information about the Binutils mailing list