public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Get rid of ununsed libunwind elf_symbol lookup patches.
@ 2007-11-28 12:47 mark
  0 siblings, 0 replies; only message in thread
From: mark @ 2007-11-28 12:47 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f409de5e8b941428f396bde156995f2e7acc4465 (commit)
      from  86a2f5ab52c3dd06d6271f92acfef0f29b6a223a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f409de5e8b941428f396bde156995f2e7acc4465
Author: Mark Wielaard <mwielaard@redhat.com>
Date:   Wed Nov 28 13:47:07 2007 +0100

    Get rid of ununsed libunwind elf_symbol lookup patches.
    
    2007-11-28  Mark Wielaard  <mwielaard@redhat.com>
    
           Revert:
           2006-12-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
           * src/elfxx.c (lookup_symbol): Avoid returning irrelevant symbols
           defined as the last ones before the address in different
           section.
    
           2006-12-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
           * src/elfxx.c (lookup_symbol): Fixed excessive buffer
           size requirement.

-----------------------------------------------------------------------

Summary of changes:
 frysk-imports/libunwind/ChangeLog   |   14 +++++++++
 frysk-imports/libunwind/src/elfxx.c |   51 -----------------------------------
 2 files changed, 14 insertions(+), 51 deletions(-)

First 500 lines of diff:
diff --git a/frysk-imports/libunwind/ChangeLog b/frysk-imports/libunwind/ChangeLog
index 073fa37..cc60b59 100644
--- a/frysk-imports/libunwind/ChangeLog
+++ b/frysk-imports/libunwind/ChangeLog
@@ -1,5 +1,19 @@
 2007-11-28  Mark Wielaard  <mwielaard@redhat.com>
 
+	Revert:
+	2006-12-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* src/elfxx.c (lookup_symbol): Avoid returning irrelevant symbols
+	defined as the last ones before the address in different
+	section.
+
+	2006-12-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* src/elfxx.c (lookup_symbol): Fixed excessive buffer
+	size requirement.
+
+2007-11-28  Mark Wielaard  <mwielaard@redhat.com>
+
 	* .cvsignore, config/.cvsignore, doc/.cvsignore,
 	include/.cvsignore, src/.cvsignore, tests/.cvsignore: Removed.
 
diff --git a/frysk-imports/libunwind/src/elfxx.c b/frysk-imports/libunwind/src/elfxx.c
index ae1ef34..6b32305 100644
--- a/frysk-imports/libunwind/src/elfxx.c
+++ b/frysk-imports/libunwind/src/elfxx.c
@@ -51,15 +51,12 @@ elf_w (lookup_symbol) (unw_addr_space_t as,
   Elf_W (Off) soff, str_soff;
   Elf_W (Shdr) *shdr, *str_shdr;
   Elf_W (Addr) val, min_dist = ~(Elf_W (Addr))0;
-  Elf_W (Addr) val_max_below = 0;
   int i, ret = 0;
   char *strtab;
 
   if (!elf_w (valid_object) (ei))
     return -UNW_ENOINFO;
 
-  buf_len--;	/* Terminating 0. */
-
   soff = ehdr->e_shoff;
   if (soff + ehdr->e_shnum * ehdr->e_shentsize > ei->size)
     {
@@ -103,58 +100,10 @@ elf_w (lookup_symbol) (unw_addr_space_t as,
 	      if (ELF_W (ST_TYPE) (sym->st_info) == STT_FUNC
 		  && sym->st_shndx != SHN_UNDEF)
 		{
-		  Elf_W (Shdr) *shdr2;
-		  int i2;
-
 		  if (tdep_get_func_addr (as, sym->st_value, &val) < 0)
 		    continue;
 		  if (sym->st_shndx != SHN_ABS)
 		    val += load_offset;
-
-		  if (ip < val)
-		    continue;
-		  if (val + sym->st_size < val_max_below)
-		    continue;
-		  val_max_below = val + sym->st_size;
-		  if (sym->st_size && ip >= val + sym->st_size)
-		    continue;
-
-		  if ((Elf_W (Addr)) (ip - val) >= min_dist)
-		    continue;
-
-		  /* Check both the address and the symbol belong to the same
-		     section.  */
-		  shdr2 = (Elf_W (Shdr) *) ((char *) ei->image + soff);
-		  for (i2 = 0; i2 < ehdr->e_shnum; ++i2,
-		       shdr2 = (Elf_W (Shdr) *) (((char *) shdr2) + ehdr->e_shentsize))
-		    {
-		      unw_word_t addr_start;
-
-		      if (shdr2->sh_type != SHT_PROGBITS)
-			continue;
-		      /* `load_offset' is no absolute address.
-		         `shdr2->sh_addr' is address where the library was prelink(8)ed to.
-			 `load_offset + shdr2->sh_addr' will give the loaded address.
-			 `shdr2->sh_addr == 0' is for sections not in the memory image.
-			 prelink(8) at offset 0x0:
-			 	load_offset=0x360000,segbase=0x360000,p_vaddr=0x0,p_paddr=0x0
-			 	segbase=0x360000,load_offset=0x360000,shdr2->sh_addr=0x1b4,shdr2->sh_offset=0x1b4,ip=0x3601c5
-			 prelink(8) at offset 0x8048000:
-			 	load_offset=0xf80c9000,segbase=0x111000,p_vaddr=0x8048000,p_paddr=0x8048000
-			 	segbase=0x111000,load_offset=0xf80c9000,shdr2->sh_addr=0x80481b4,shdr2->sh_offset=0x1b4,ip=0x1111c5
-			 */
-		      if (shdr2->sh_addr == 0)
-			continue;
-		      addr_start = load_offset + shdr2->sh_addr;
-		      if (ip >= addr_start
-			  && ip < addr_start + shdr2->sh_size
-			  && val >= addr_start
-			  && val < addr_start + shdr2->sh_size)
-			break;
-		    }
-		  if (i2 >= ehdr->e_shnum)
-		    continue;
-
 		  Debug (16, "0x%016lx info=0x%02x %s\n",
 			 (long) val, sym->st_info, strtab + sym->st_name);
 


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-28 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28 12:47 [SCM] master: Get rid of ununsed libunwind elf_symbol lookup patches mark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).