This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: RFA: Support STT_COMMON symbol type in dynamic loader


Ok Nick, please go ahead.

-- Jeff J.

Nick Clifton wrote:
Hi Jeff,

  I would like to copy a recent glibc fix (for PR 5104, which also
  references the binutils PR 4799) into newlib.  It allows the dynamic
  loader to support symbols with the STT_COMMON type.  The linker does
  not currently produce such symbols, but it may do in the future and
  it would be helpful if the dynamic loader supported them.

Cheers
  Nick

newlib/ChangeLog
2007-10-08  Nick Clifton  <nickc@redhat.com>

	* libc/sys/linux/dl/do-lookup.h (FCT): Support symbols with
	the STT_COMMON type.

Index: libc/sys/linux/dl/do-lookup.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/linux/dl/do-lookup.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 do-lookup.h
*** libc/sys/linux/dl/do-lookup.h 28 May 2003 22:04:34 -0000 1.1
--- libc/sys/linux/dl/do-lookup.h 8 Oct 2007 08:28:20 -0000
*************** FCT (const char *undef_name, unsigned lo
*** 83,91 ****
(type_class & (sym->st_shndx == SHN_UNDEF)))
continue;
! if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
! /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC entries
! since these are no code/data definitions. */
continue;
if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
--- 83,92 ----
(type_class & (sym->st_shndx == SHN_UNDEF)))
continue;
! if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC
! && ELFW(ST_TYPE) (sym->st_info) != STT_COMMON)
! /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_COMMON and
! STT_FUNC entries since these are no code/data definitions. */
continue;
if (sym != ref && strcmp (strtab + sym->st_name, undef_name))


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