This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [David Mosberger <davidm@hpl.hp.com>] problem with unwind info for .init/.fini sections


>>>>> On Sat, 2 Mar 2002 13:43:44 -0800, "H . J . Lu" <hjl@lucon.org> said:

  HJ> I noticed 2 problems:

  HJ> 1. glibc doesn't support .*_array in executales. elf/dl-init.c is not
  HJ> used on executables. However, sysdeps/generic/libc-start.c doesn't
  HJ> know how to do it. Glibc needs to be modified to call those functions
  HJ> with __*_array_start/__*_array_end.

Yes, I noticed that, too.  Wouldn't libc-start.c also have to call the
preinit array if the program is statically linked?

  HJ> We can use

  HJ> +  { ".init_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE         }, 
  HJ> +  { ".fini_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE         },
  HJ> +  { ".preinit_array",SHT_PROGBITS, SHF_ALLOC + SHF_WRITE   }, 

  HJ> in gas and let bfd to set the section type. Or we can teach gcc about
  HJ> those special sections.

The latter seems better.  On targets where this is supported, we'll
want gcc to use the arrays at any rate (it's certainly true for ia64,
due to the unwind issues that started this discussion).

	--david


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]