solib.c bfd_elf_get_arch_size() changes break build

Fernando Nasser fnasser@cygnus.com
Mon Sep 18 11:16:00 GMT 2000


Fernando Nasser wrote:
> 
> Andrew Cagney wrote:
> >
> > "J.T. Conklin" wrote:
> > >
> > > The changes to solib.c to use bfd_elf_get_arch_size() break the GDB
> > > build for a.out targets that use solib.c such as NetBSD/i386 1.4.
> > >
> > > In info_sharedlibrary_command(), it appears that the intent was for
> > > bfd_elf_get_arch_size() to fail at run time on non-elf targets.
> > > However, that function/macro is not available on those targets
> > > and GDB fails to link.
> > >
> > > I've enclosed the offending part of the diff.
> >
> > Has anyone had a chance to look at this?
> >
> >         Andrew
> >
> 
> I am getting complaints from everywhere about this.  I think we will have to
> revert this change ASAP!
> 
> Fernando
> 

Well, someone just tried to revert this and told me thta it didn't work for him....
solib.c still does not compile.

F.



> > >
> > >         --jtc
> > >
> > > ***************
> > > *** 1491,1503 ****
> > >         return;
> > >       }
> > >
> > > ! #ifndef TARGET_ELF64
> > > !   addr_width = 8 + 4;
> > > !   addr_fmt = "08l";
> > > ! #else
> > > !   addr_width = 16 + 4;
> > > !   addr_fmt = "016l";
> > > ! #endif
> > >
> > >     update_solib_list (from_tty, 0);
> > >
> > > --- 1504,1521 ----
> > >         return;
> > >       }
> > >
> > > !   arch_size = bfd_elf_get_arch_size (exec_bfd);
> > > !   /* Default to 32-bit in case of failure (non-elf). */
> > > !   if (arch_size == 32 || arch_size == -1)
> > > !     {
> > > !       addr_width = 8 + 4;
> > > !       addr_fmt = "08l";
> > > !     }
> > > !   else if (arch_size == 64)
> > > !     {
> > > !       addr_width = 16 + 4;
> > > !       addr_fmt = "016l";
> > > !     }
> > >
> > >     update_solib_list (from_tty, 0);
> > >
> > >
> > > --
> > > J.T. Conklin
> > > RedBack Networks
> 
> --
> Fernando Nasser
> Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
> 2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
> Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299


More information about the Gdb mailing list