Bug 85120

Summary: Update port: devel/libelf to 0.8.6
Product: Ports & Packages Reporter: Vasil Dimov <vd>
Component: Individual Port(s)Assignee: Peter Pentchev <roam>
Status: Closed FIXED    
Severity: Affects Only Me CC: roam
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
libelf_0.8.5-0.8.6.diff
none
patch-lib::64.xlatetof.c
none
patch-lib::gelf.h
none
file.diff none

Description Vasil Dimov 2005-08-19 15:20:07 UTC
Update libelf from 0.8.5 to 0.8.6

* swap www.mr511.de and ${MASTER_SITE_SUNSITE} as the archive has not
  yet appeared on ${MASTER_SITE_SUNSITE} - save "Not found" cycles

* change nonexistent (in FreeBSD) types Elf64_Xword and Elf64_Sxword
  used in source with the equivalent ones: Elf64_Word and Elf64_Sword
  I have also attached a separate patch for each file, but the sed
  command in Makefile is easier for maintenance IMHO.

* introduce files/patch-Makefile.in to force libelf.pc to go in the
  right place

* sync files/patch-configure and pkg-plist

Fix: If these will be added, post-patch: should be removed from Makefile


--- lib/32.fsize.c.orig	Fri Aug 19 16:18:02 2005
+++ lib/32.fsize.c	Fri Aug 19 16:18:48 2005
@@ -68,8 +68,8 @@
 	    { sizeof(Elf64_Sword),    sizeof(__ext_Elf64_Sword)  },
 	    { sizeof(Elf64_Sym),      sizeof(__ext_Elf64_Sym)    },
 	    { sizeof(Elf64_Word),     sizeof(__ext_Elf64_Word)   },
-	    { sizeof(Elf64_Sxword),   sizeof(__ext_Elf64_Sxword) },
-	    { sizeof(Elf64_Xword),    sizeof(__ext_Elf64_Xword)  },
+	    { sizeof(Elf64_Sword),    sizeof(__ext_Elf64_Sxword) },
+	    { sizeof(Elf64_Word),     sizeof(__ext_Elf64_Xword)  },
 	    /* XXX: check Solaris values */
 	    { 0, 0 },	/* Elf64_Verdef/Verdaux size varies */
 	    { 0, 0 },	/* Elf64_Verneed/Vernaux size varies */
--- patch-lib::32.fsize.c ends here ---

--- lib/cook.c.orig	Fri Aug 19 16:21:53 2005
+++ lib/cook.c	Fri Aug 19 16:22:31 2005
@@ -245,7 +245,7 @@
 		/*
 		 * Check for overflow on 32-bit systems
 		 */
-		if (overflow(num, u.sh64.sh_size, Elf64_Xword)) {
+		if (overflow(num, u.sh64.sh_size, Elf64_Word)) {
 		    seterr(ERROR_OUTSIDE);
 		    return 0;
 		}
@@ -320,9 +320,9 @@
 		/*
 		 * Check for overflow on 32-bit systems
 		 */
-		if (overflow(scn->s_size, shdr->sh_size, Elf64_Xword)
+		if (overflow(scn->s_size, shdr->sh_size, Elf64_Word)
 		 || overflow(scn->s_offset, shdr->sh_offset, Elf64_Off)
-		 || overflow(sd->sd_data.d_align, shdr->sh_addralign, Elf64_Xword)) {
+		 || overflow(sd->sd_data.d_align, shdr->sh_addralign, Elf64_Word)) {
 		    seterr(ERROR_OUTSIDE);
 		    return 0;
 		}
--- patch-lib::cook.c ends here ---
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2005-08-19 15:32:41 UTC
State Changed
From-To: open->analyzed

Looking into this. 


Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2005-08-19 15:32:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->roam

My port.
Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2005-09-05 23:36:37 UTC
State Changed
From-To: analyzed->closed

Update committed, thanks! 
I added a small patch to fix the compilation on 4.x systems.