cvs commit: src/sys/powerpc/powerpc elf_machdep.c

Peter Grehan grehan at FreeBSD.org
Thu Jul 22 17:46:06 PDT 2004


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


More information about the cvs-src mailing list