[parisc-linux] [patch] Remove magic constant from gas/tc-hppa.c
Jeff Bailey
jbailey@raspberryginger.com
Sun Oct 22 01:09:00 GMT 2006
Le samedi 21 octobre 2006 à 15:44 -0400, John David Anglin a écrit :
> > I opted for eliminating the DEFAULT_LEVEL because it's not clear at a
> > glance what it's a level of, it's only used in that one place, and the
> > construct isn't used in any of the other architectures.
>
> See pa_level. The magic numbers end up in the .o files. The hpux
> linker will issue errors and warnings if you try to link an inconsistent
> set of object files. The values appear in various places such as
> bfd/archures.c, bfd/libhppa.h, ...
Sorry, I don't mean that the magic number is only used in that one
place, rather that the constant DEFAULT_LEVEL is only used in that one
place. pa_level just uses the magic numbers directly (as fixed by the
updated patch):
2006-10-21 Jeff Bailey <jbailey@raspberryginger.com>
* config/tc-hppa.c: Do not define DEFAULT_LEVEL.
(need_pa11_opcode): Use bfd_mach_hppa11 instead of pa11 for
consistency.
(pa_level): Use defines from bfd.h instead of magic numbers.
(md_begin): Use defines from bfd.h instead of DEFAULT_LEVEL.
--
Jeff Bailey - http://www.raspberryginger.com/jbailey/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc-hppa.c.diff
Type: text/x-patch
Size: 2758 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20061022/8bad58f3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <https://sourceware.org/pipermail/binutils/attachments/20061022/8bad58f3/attachment.sig>
More information about the Binutils
mailing list