Why does mips define elf_backend_sign_extend_vma to true?
H . J . Lu
hjl@lucon.org
Tue Aug 7 18:52:00 GMT 2001
On Tue, Aug 07, 2001 at 06:45:04PM -0700, H . J . Lu wrote:
> On Tue, Aug 07, 2001 at 09:42:24PM -0400, Andrew Cagney wrote:
> > > On Tue, Aug 07, 2001 at 06:24:59PM -0700, H . J . Lu wrote:
> > >
> > >> Only elf32-mips.c has
> > >>
> > >> #define elf_backend_sign_extend_vma true
> > >>
> > >> and we get
> > >>
> > >> # nm vmlinux
> > >> ffffffff802e01f0 D C_A_D
> > >> ffffffff802df344 D EISA_bus
> > >> ....
> > >>
> > >> Does anyone know why mips does this?
> > >>
> > >
> > >
> > > It seems that it was done on purpose:
> > >
> > > http://sources.redhat.com/ml/binutils/1999-11/msg00080.html
> > >
> > > I don't believe it is correct for the normal 32bit MIPS SVR4 ABI. I'd like
> > > to turn it off. If you want to do sign extension, you should create a new
> > > ABI, not break the existing ABI.
> >
> >
> > Several ABI's have implied sign extension of addresses. MIPS is one.
> >
>
> Show me where it is documemnted in the 32bit SVR4 MIPS ABI.
>
FYI, some prorgams using bfd are broken on Linux/mips because of this: nm,
objdump and gdb. In gdb
# gdb vmlinux
...
(gdb) list printk
1874
1875 static void __exit packet_exit(void)
1876 {
1877 remove_proc_entry("net/packet", 0);
1878 unregister_netdevice_notifier(&packet_netdev_notifier);
1879 sock_unregister(PF_PACKET);
1880 return;
1881 }
1882
1883 static int __init packet_init(void)
H.J.
More information about the Gdb
mailing list