Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2004 00:46:05 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/powerpc/powerpc elf_machdep.c
Message-ID:  <200407230046.i6N0k5ob021247@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
grehan      2004-07-23 00:46:05 UTC

  FreeBSD src repository

  Modified files:
    sys/powerpc/powerpc  elf_machdep.c 
  Log:
  The ADDR16 relocations were assuming that non-local symbols had an
  addend of 0. This isn't correct, and was quite easy to break by
  referring to the address of an element within a structure.
  
   However, fixing this exposed the fact that symbol lookups for
  local variables were returning the base of the section they
  were contained in. This case is detected by comparing the return
  value from elf_lookup() to the relocbase+addend value: if it is
  lesser, but greater than relocbase, then relocbase+addend is
  taken to be the authoritative value.
  
  bug reported by:  gallatin
  
  Revision  Changes    Path
  1.21      +24 -14    src/sys/powerpc/powerpc/elf_machdep.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407230046.i6N0k5ob021247>