This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: elflint versus gnu gold


On Sun, 2009-07-26 at 08:35 -0700, Ulrich Drepper wrote:
> I've pushed the rest of the changes.

Thanks.

> But:
> 
> - - you didn't update your repository from the trunk before pushing the
> patches
> 
> - - you didn't update the copyright year in the header of one file (the
> others have already been changed this year)

Hopefully both fixed with this patch that adds the handling of the new
note in ebl_object_note () to print the contents, which I forgot to
implement earlier.

Cheers,

Mark
>From 4ca33824aa68e17fba27b94613df08bbf0972eb6 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw@redhat.com>
Date: Sun, 26 Jul 2009 23:20:21 +0200
Subject: [PATCH] eblobjnote.c (ebl_object_note): Handle NT_GNU_GOLD_VERSION.

---
 libebl/ChangeLog    |    4 ++++
 libebl/eblobjnote.c |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 46a58c7..a1d14c4 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-27  Mark Wielaard  <mjw@redhat.com>
+
+	* eblobjnote.c (ebl_object_note): Handle NT_GNU_GOLD_VERSION.
+
 2009-07-26  Mark Wielaard  <mjw@redhat.com>
 
 	* eblobjnotetypename.c (ebl_object_note_type_name): Recognize
diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
index 836ac8d..c7f1125 100644
--- a/libebl/eblobjnote.c
+++ b/libebl/eblobjnote.c
@@ -1,5 +1,5 @@
 /* Print contents of object file note.
-   Copyright (C) 2002, 2007 Red Hat, Inc.
+   Copyright (C) 2002, 2007, 2009 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -70,6 +70,12 @@ ebl_object_note (ebl, name, type, descsz, desc)
     /* The machine specific function did not know this type.  */
     switch (type)
       {
+      case NT_GNU_GOLD_VERSION:
+	if (strcmp (name, "GNU") == 0 && descsz > 0)
+	  // A non-null terminated version string.
+	  printf ("%s%.*s\n", gettext ("    Version String: "), descsz, desc);
+	break;
+
       case NT_GNU_BUILD_ID:
 	if (strcmp (name, "GNU") == 0 && descsz > 0)
 	  {
-- 
1.6.2.5


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