public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] Prepare 0.167 release.
@ 2016-08-16 18:57 Mark Wielaard
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2016-08-16 18:57 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 3336 bytes --]

Hi Jose,

On Tue, Aug 09, 2016 at 10:58:35PM +0200, Mark Wielaard wrote:
> On Tue, Aug 09, 2016 at 01:58:30PM +0200, Jose E. Marchesi wrote:
> > Ok for master?
> 
> OK with the following nitpicks below.

Did you have time to look at the nitpicks and see if you want to
push it with those?

Note, there is no hurry. I am currently travelling with limited
internet connectivity so pushing out a new release will probably
have to wait till end of the week anyway. And if at all possible
I would like to see if we can figure out the spurious testcase
failure on ubuntu. Although it seems like there is nobody around
who can both replicate and test some assumptions.

Cheers,

Mark

> > commit c7e007a9f3bd550a2f00e41f303f23175af0dcca
> > Author: Jose E. Marchesi <jose.marchesi@oracle.com>
> > Date:   Tue Aug 9 04:30:37 2016 -0700
> > 
> >     sparc: fix the printing of hw capabilities object attributes.
> >     
> >     The GNU_Sparc_HWCAPS and GNU_Sparc_HWCAPS2 object attributes comprise a
> >     set of hardware capabilities that may (or not) be present in the target
> >     machine for which the object was compiled.  This patch adds the support
> >     for printing a nicely formatted comma-separated list with the selected
> >     hw capabilities.
> >     
> >     Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
> > 
> 
> > @@ -41,33 +41,62 @@ sparc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
> >  			      const char *vendor, int tag, uint64_t value,
> >  			      const char **tag_name, const char **value_name)
> >  {
> > +  static const char *hwcaps[32] =
> > +    {
> > +     "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", "asi_blk_init", "fmaf",
> > +      "vis3", "hpc", "random", "trans", "fjfmau", "ima",
> > +      "asi_cache_sparing", "aes", "des", "kasumi", "camellia", "md5", "sha1",
> > +      "sha256", "sha512", "mpmul", "mont", "pause", "cbcond", "crc32c", "resv30",
> > +      "resv31"
> > +    };
> > +
> > +  
> > +  static const char *hwcaps2[32] =
> > +    {
> > +      "fjathplus", "vis3b", "adp", "sparc5", "mwait", "xmpmul", "xmont", "nsec",
> > +      "resv8", "resv9" , "resv10", "resv11", "fjathhpc", "fjdes", "fjaes", "resv15",
> > +      "resv16", "resv17", "resv18", "resv19", "resv20", "resv21", "resv22", "resv23",
> > +      "resv24", "resv25", "resv26", "resv27", "resv28", "resv29", "resv30", "resv31",
> > +    };
> 
> If possible try to keep lines < 80 chars please.
> 
> > +          char *s = name;
> > +          for (cap = 0; cap < 32; cap++)
> > +            if (value & (1 << cap))
> 
> Use (1U << cap) since signed left shift is undefined if you move 1 into
> the signed bit.
> 
> > +              {
> > +                if (*s != '\0')
> > +                  s = strcat (s, ",");
> > +                s = strcat (s, caps[cap] ? caps[cap] : "unknown");
> 
> Given the arrays above "unknown" can never happen?
> 
> > diff --git a/tests/testfilesparc64attrs.o.bz2 b/tests/testfilesparc64attrs.o.bz2
> > new file mode 100644
> > index 0000000..7be7f88
> > Binary files /dev/null and b/tests/testfilesparc64attrs.o.bz2 differ
> 
> I trust this is as described. But if you could use git format-patch next
> time that would be appreciated.
> 
> Thanks,
> 
> Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Prepare 0.167 release.
@ 2016-08-09 20:58 Mark Wielaard
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2016-08-09 20:58 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 2648 bytes --]

Hi Jose,

On Tue, Aug 09, 2016 at 01:58:30PM +0200, Jose E. Marchesi wrote:
> Ok for master?

OK with the following nitpicks below.

> commit c7e007a9f3bd550a2f00e41f303f23175af0dcca
> Author: Jose E. Marchesi <jose.marchesi@oracle.com>
> Date:   Tue Aug 9 04:30:37 2016 -0700
> 
>     sparc: fix the printing of hw capabilities object attributes.
>     
>     The GNU_Sparc_HWCAPS and GNU_Sparc_HWCAPS2 object attributes comprise a
>     set of hardware capabilities that may (or not) be present in the target
>     machine for which the object was compiled.  This patch adds the support
>     for printing a nicely formatted comma-separated list with the selected
>     hw capabilities.
>     
>     Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
> 

> @@ -41,33 +41,62 @@ sparc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
>  			      const char *vendor, int tag, uint64_t value,
>  			      const char **tag_name, const char **value_name)
>  {
> +  static const char *hwcaps[32] =
> +    {
> +     "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", "asi_blk_init", "fmaf",
> +      "vis3", "hpc", "random", "trans", "fjfmau", "ima",
> +      "asi_cache_sparing", "aes", "des", "kasumi", "camellia", "md5", "sha1",
> +      "sha256", "sha512", "mpmul", "mont", "pause", "cbcond", "crc32c", "resv30",
> +      "resv31"
> +    };
> +
> +  
> +  static const char *hwcaps2[32] =
> +    {
> +      "fjathplus", "vis3b", "adp", "sparc5", "mwait", "xmpmul", "xmont", "nsec",
> +      "resv8", "resv9" , "resv10", "resv11", "fjathhpc", "fjdes", "fjaes", "resv15",
> +      "resv16", "resv17", "resv18", "resv19", "resv20", "resv21", "resv22", "resv23",
> +      "resv24", "resv25", "resv26", "resv27", "resv28", "resv29", "resv30", "resv31",
> +    };

If possible try to keep lines < 80 chars please.

> +          char *s = name;
> +          for (cap = 0; cap < 32; cap++)
> +            if (value & (1 << cap))

Use (1U << cap) since signed left shift is undefined if you move 1 into
the signed bit.

> +              {
> +                if (*s != '\0')
> +                  s = strcat (s, ",");
> +                s = strcat (s, caps[cap] ? caps[cap] : "unknown");

Given the arrays above "unknown" can never happen?

> diff --git a/tests/testfilesparc64attrs.o.bz2 b/tests/testfilesparc64attrs.o.bz2
> new file mode 100644
> index 0000000..7be7f88
> Binary files /dev/null and b/tests/testfilesparc64attrs.o.bz2 differ

I trust this is as described. But if you could use git format-patch next
time that would be appreciated.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Prepare 0.167 release.
@ 2016-08-09 11:58 Jose E. Marchesi
  0 siblings, 0 replies; 4+ messages in thread
From: Jose E. Marchesi @ 2016-08-09 11:58 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 6450 bytes --]

    
    The only pending fix that I know of is Jose's GNU_Sparc_HWCAPS tag values
    patch. After that is in I would like to push out the release.

There it is.
Ok for master?

commit c7e007a9f3bd550a2f00e41f303f23175af0dcca
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Tue Aug 9 04:30:37 2016 -0700

    sparc: fix the printing of hw capabilities object attributes.
    
    The GNU_Sparc_HWCAPS and GNU_Sparc_HWCAPS2 object attributes comprise a
    set of hardware capabilities that may (or not) be present in the target
    machine for which the object was compiled.  This patch adds the support
    for printing a nicely formatted comma-separated list with the selected
    hw capabilities.
    
    Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>

diff --git a/backends/ChangeLog b/backends/ChangeLog
index af32d8f..53d2908 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sparc_attrs.c (sparc_check_object_attribute): Fix the
+	calculation of GNU_SParc_HWCAPS and GNU_SParc_HWCAPS2 values as
+	comma-separated list of hw capability names.
+
 2016-07-10  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* m68k_corenote.c (ALIGN_PRSTATUS): Define.
@@ -13,7 +19,6 @@
 	* common-reloc.c (copy_reloc_p): Honor NO_COPY_RELOC.
 	(init_reloc): Likewise.
 
-
 2016-05-20  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* Makefile.am (modules): Add m68k.
diff --git a/backends/sparc_attrs.c b/backends/sparc_attrs.c
index e95b577..2a6f437 100644
--- a/backends/sparc_attrs.c
+++ b/backends/sparc_attrs.c
@@ -41,33 +41,62 @@ sparc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
 			      const char *vendor, int tag, uint64_t value,
 			      const char **tag_name, const char **value_name)
 {
+  static const char *hwcaps[32] =
+    {
+      "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", "asi_blk_init", "fmaf",
+      "vis3", "hpc", "random", "trans", "fjfmau", "ima",
+      "asi_cache_sparing", "aes", "des", "kasumi", "camellia", "md5", "sha1",
+      "sha256", "sha512", "mpmul", "mont", "pause", "cbcond", "crc32c", "resv30",
+      "resv31"
+    };
+
+  
+  static const char *hwcaps2[32] =
+    {
+      "fjathplus", "vis3b", "adp", "sparc5", "mwait", "xmpmul", "xmont", "nsec",
+      "resv8", "resv9" , "resv10", "resv11", "fjathhpc", "fjdes", "fjaes", "resv15",
+      "resv16", "resv17", "resv18", "resv19", "resv20", "resv21", "resv22", "resv23",
+      "resv24", "resv25", "resv26", "resv27", "resv28", "resv29", "resv30", "resv31",
+    };
+
+  /* NAME should be big enough to hold any possible comma-separated
+     list (no repetitions allowed) of attribute names from one of the
+     arrays above.  */
+  static char name[32*17+32+1];
+  name[0] = '\0';
+
   if (!strcmp (vendor, "gnu"))
     switch (tag)
       {
       case 4:
-	*tag_name = "GNU_Sparc_HWCAPS";
-	static const char *hwcaps[30] =
-	  {
-	    "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
-	    "asi_blk_init", "fmaf", NULL, "vis3", "hpc", "random", "trans", "fjfmau",
-	    "ima", "asi_cache_sparing", "aes", "des", "kasumi", "camellia",
-	    "md5", "sha1", "sha256", "sha512", "mpmul", "mont", "pause",
-	    "cbcond", "crc32c"
-	  };
-	if (value < 30 && hwcaps[value] != NULL)
-	  *value_name = hwcaps[value];
-	return true;
-
       case 8:
-	*tag_name = "GNU_Sparc_HWCAPS2";
-	static const char *hwcaps2[11] =
-	  {
-	    "fjathplus", "vis3b", "adp", "sparc5", "mwait", "xmpmul",
-	    "xmont", "nsec", "fjathhpc", "fjdes", "fjaes"
-	  };
-	if (value < 11)
-	  *value_name = hwcaps2[value];
-	return true;
+        {
+          const char **caps;
+          int cap;
+          
+          if (tag == 4)
+            {
+              *tag_name = "GNU_Sparc_HWCAPS";
+              caps = hwcaps;
+            }
+          else
+            {
+              *tag_name = "GNU_Sparc_HWCAPS2";
+              caps = hwcaps2;
+            }
+          
+          char *s = name;
+          for (cap = 0; cap < 32; cap++)
+            if (value & (1 << cap))
+              {
+                if (*s != '\0')
+                  s = strcat (s, ",");
+                s = strcat (s, caps[cap] ? caps[cap] : "unknown");
+              }
+          
+          *value_name = s;
+          return true;
+        }
       }
 
   return false;
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 58a023c..fe7ce32 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* testfilesparc64attrs.o.bz2: New file.
+	* run-readelf-A.sh: Check attributes in a sparc object.
+
 2016-07-08  Mark Wielaard  <mjw@redhat.com>
 
 	* update3_LDADD: Use libdw instead of libebl.
diff --git a/tests/run-readelf-A.sh b/tests/run-readelf-A.sh
index 6ca9be8..159a996 100755
--- a/tests/run-readelf-A.sh
+++ b/tests/run-readelf-A.sh
@@ -1,5 +1,6 @@
 #! /bin/sh
 # Copyright (C) 2014 Red Hat, Inc.
+# Copyright (C) 2016 Oracle, Inc.
 # This file is part of elfutils.
 #
 # This file is free software; you can redistribute it and/or modify
@@ -25,7 +26,13 @@
 #
 # gcc -m32 -c testfileppc32attrs.s
 
-testfiles testfilearm testfileppc32attrs.o
+# = testfilesparc64attrs.s =
+# .gnu_attribute 4,0x2aaaaaaa
+# .gnu_attribute 8,0x00000055
+#
+# gcc -c testfilesparc64attrs.s
+
+testfiles testfilearm testfileppc32attrs.o testfilesparc64attrs.o
 
 testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF
 
@@ -62,4 +69,14 @@ Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34:
       GNU_Power_ABI_Struct_Return: r3/r4
 EOF
 
+testrun_compare ${abs_top_builddir}/src/readelf -A testfilesparc64attrs.o <<\EOF
+
+Object attributes section [ 4] '.gnu.attributes' of 21 bytes at offset 0x40:
+  Owner          Size
+  gnu              20
+    File:          12
+      GNU_Sparc_HWCAPS: div32,v8plus,vis,asi_blk_init,vis3,random,fjfmau,asi_cache_sparing,des,camellia,sha1,sha512,mont,cbcond
+      GNU_Sparc_HWCAPS2: fjathplus,adp,mwait,xmont
+EOF
+
 exit 0
diff --git a/tests/testfilesparc64attrs.o.bz2 b/tests/testfilesparc64attrs.o.bz2
new file mode 100644
index 0000000..7be7f88
Binary files /dev/null and b/tests/testfilesparc64attrs.o.bz2 differ

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Prepare 0.167 release.
@ 2016-08-04 11:50 Mark Wielaard
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2016-08-04 11:50 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 4279 bytes --]

It has been 4 months since 0.166 and given some new features and various
bug fixes it is time to push out a new 0.167 release. I just pushed the
patch below to prepare for that (stripped generated po from patch below).

The only pending fix that I know of is Jose's GNU_Sparc_HWCAPS tag values
patch. After that is in I would like to push out the release.

Please let me know if there are any other urgent pending changes/bugs
that should be resolved before doing the 0.167 if I missed them.

Thanks,

Mark

---
 ChangeLog               |    5 +
 NEWS                    |   12 +
 config/ChangeLog        |    4 +
 config/elfutils.spec.in |   11 +-
 configure.ac            |    2 +-
 po/ChangeLog            |    4 +
 po/de.po                | 1051 +++++++-------------------------
 po/es.po                | 1544 ++++++++++++++++++++---------------------------
 po/ja.po                | 1482 +++++++++++++++++++--------------------------
 po/pl.po                | 1486 +++++++++++++++++++--------------------------
 po/uk.po                | 1509 ++++++++++++++++++++-------------------------
 11 files changed, 2795 insertions(+), 4315 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6a038a2..07e8f57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-04  Mark Wielaard  <mjw@redhat.com>
+
+	* configure.ac: Set version to 0.167.
+	* NEWS: Add 0.167 section.
+
 2016-07-06  Mark Wielaard  <mjw@redhat.com>
 
 	* .gitignore: Remove src/ld. ldlex.c, ldscript.c and ldscript.h.
diff --git a/NEWS b/NEWS
index 1a55d3a..599970b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+Version 0.167
+
+libasm: Add eBPF disassembler for EM_BPF files.
+
+backends: Add m68k and BPF backends.
+
+ld: Removed.
+
+dwelf: Add ELF/DWARF string table creation functions. dwelf_strtab_init,
+       dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize,
+       dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free.
+
 Version 0.166
 
 config: The default program prefix for the installed tools is now eu-.
diff --git a/config/ChangeLog b/config/ChangeLog
index 4ca6fa8..2ca25bc 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-04  Mark Wielaard  <mjw@redhat.com>
+
+	* elfutils.spec.in: Update for 0.167.
+
 2016-07-06  Mark Wielaard  <mjw@redhat.com>
 
 	* elfutils.spec.in: Remove eu-ld.
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index b62be26..9b87d05 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -226,7 +226,16 @@ rm -rf ${RPM_BUILD_ROOT}
 %config(noreplace) %{_sysctldir}/10-default-yama-scope.conf
 
 %changelog
-* Thu Mar 31 2016 Mark Wielaard <mark@gmail.com> 0.166-1
+* Thu Aug  4 2016 Mark Wielaard <mjw@redhat.com> 0.167-1
+- libasm: Add eBPF disassembler for EM_BPF files.
+- backends: Add m68k and BPF backends.
+- ld: Removed.
+- dwelf: Add ELF/DWARF string table creation functions.
+  dwelf_strtab_init, dwelf_strtab_add, dwelf_strtab_add_len,
+  dwelf_strtab_finalize, dwelf_strent_off, dwelf_strent_str and
+  dwelf_strtab_free.
+
+* Thu Mar 31 2016 Mark Wielaard <mjw@redhat.com> 0.166-1
 - config: The default program prefix for the installed tools is now
   eu-. Use configure --program-prefix="" to not use a program prefix.
 
diff --git a/configure.ac b/configure.ac
index e753dd9..e5503f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl  GNU General Public License for more details.
 dnl
 dnl  You should have received a copy of the GNU General Public License
 dnl  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([elfutils],[0.166],[https://bugzilla.redhat.com/],[elfutils])
+AC_INIT([elfutils],[0.167],[https://bugzilla.redhat.com/],[elfutils])
 
 # We want eu- as default program prefix if none was given by the user.
 # But if the user explicitly provided --program-prefix="" then pretend
diff --git a/po/ChangeLog b/po/ChangeLog
index 6e9900c..5ea4e53 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-04  Mark Wielaard  <mjw@redhat.com>
+
+	* *.po: Update for 0.167.
+
 2016-07-06  Mark Wielaard  <mjw@redhat.com>
 
 	* po/POTFILES.in: Removed libebl/eblobjecttypename.c,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-16 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 18:57 [PATCH] Prepare 0.167 release Mark Wielaard
  -- strict thread matches above, loose matches on Subject: below --
2016-08-09 20:58 Mark Wielaard
2016-08-09 11:58 Jose E. Marchesi
2016-08-04 11:50 Mark Wielaard

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).