<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_external_elfutils/tests/ChangeLog, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/'/>
<entry>
<title>libdw,readelf: Recognize DW_CFA_AARCH64_negate_ra_state</title>
<updated>2020-09-07T10:21:10+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-09-03T15:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=5ed73d79bf5670484963cb5b57b8da50c68d5c3e'/>
<id>5ed73d79bf5670484963cb5b57b8da50c68d5c3e</id>
<content type='text'>
DW_CFA_AARCH64_negate_ra_state is used on aarch64 to indicate whether
or not the return address is mangled or not. This has the same value
as the DW_CFA_GNU_window_save. So we have to pass around the e_machine
value of the process or core we are inspecting to know which one to
use.

Note that it isn't actually implemented yet. It needs ARMv8.3 hardware.
If we don't have such hardware it is enough to simply ignore the
DW_CFA_AARCH64_negate_ra_state (and not confuse it with
DW_CFA_GNU_window_save) to get backtraces to work on aarch64.

Add a testcase for eu-readelf --debug-dump=frames to show the value
is correctly recognized. Also don't warn we cannot find any DWARF
if we are just dumping frames (those will come from .eh_frame if
there is no .debug_frame).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DW_CFA_AARCH64_negate_ra_state is used on aarch64 to indicate whether
or not the return address is mangled or not. This has the same value
as the DW_CFA_GNU_window_save. So we have to pass around the e_machine
value of the process or core we are inspecting to know which one to
use.

Note that it isn't actually implemented yet. It needs ARMv8.3 hardware.
If we don't have such hardware it is enough to simply ignore the
DW_CFA_AARCH64_negate_ra_state (and not confuse it with
DW_CFA_GNU_window_save) to get backtraces to work on aarch64.

Add a testcase for eu-readelf --debug-dump=frames to show the value
is correctly recognized. Also don't warn we cannot find any DWARF
if we are just dumping frames (those will come from .eh_frame if
there is no .debug_frame).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libebl: Handle aarch64 bti, pac bits in gnu property note</title>
<updated>2020-09-07T09:23:54+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-09-03T13:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=18d64cd8e7ce0761568631bb40136ca7a154b6e0'/>
<id>18d64cd8e7ce0761568631bb40136ca7a154b6e0</id>
<content type='text'>
When building with gcc -mbranch-protection= we might get a gnu property
note indicating BTI (Branch Target Identification) and/or PAC (Pointer
Authentication Code) is being used.

Add a small testcase to show eu-readelf -n now properly lists those
bits in the gnu property note.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building with gcc -mbranch-protection= we might get a gnu property
note indicating BTI (Branch Target Identification) and/or PAC (Pointer
Authentication Code) is being used.

Add a small testcase to show eu-readelf -n now properly lists those
bits in the gnu property note.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Only typedef Ebl once.</title>
<updated>2020-07-23T20:46:46+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-07-19T19:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=15495182302edbe0142101ec3a09e478901ab994'/>
<id>15495182302edbe0142101ec3a09e478901ab994</id>
<content type='text'>
Since commit 287a18452 libasm.h defines an opague Ebl handle.
This is fine, except for (internal) code that also includes libebl.h.
Since C11 having multiple typedefs for the same thing is fine, but we
do build using GNU/C99. This also allows multiple same typedefs, except
for (very) old GCCs.

This only affects internal code, since libebl.h isn't a public header.

For internal code, only add the typedef in libebl.h when libasm.h
hasn't been included. Make sure all code that includes both headers
includes libasm.h first.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 287a18452 libasm.h defines an opague Ebl handle.
This is fine, except for (internal) code that also includes libebl.h.
Since C11 having multiple typedefs for the same thing is fine, but we
do build using GNU/C99. This also allows multiple same typedefs, except
for (very) old GCCs.

This only affects internal code, since libebl.h isn't a public header.

For internal code, only add the typedef in libebl.h when libasm.h
hasn't been included. Make sure all code that includes both headers
includes libasm.h first.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libasm: Make libasm.h include work without relying on any other include.</title>
<updated>2020-07-17T23:50:01+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-07-04T22:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=f9915d3f1947e6bcf9102329500626bd8e74bdd3'/>
<id>f9915d3f1947e6bcf9102329500626bd8e74bdd3</id>
<content type='text'>
The public headers should be usable when includes as is.
libasm.h wasn't because it was using gelf.h data structures without
include gelf.h. Include it now in libasm.h.

Add a new testcase run-test-includes.sh to test all public headers
can be included "standalone".

https://sourceware.org/bugzilla/show_bug.cgi?id=26176

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The public headers should be usable when includes as is.
libasm.h wasn't because it was using gelf.h data structures without
include gelf.h. Include it now in libasm.h.

Add a new testcase run-test-includes.sh to test all public headers
can be included "standalone".

https://sourceware.org/bugzilla/show_bug.cgi?id=26176

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debuginfod: DEBUGINFOD_URLS should accept scheme-free urls</title>
<updated>2020-07-05T15:00:33+00:00</updated>
<author>
<name>Alice Zhang</name>
<email>alizhang@redhat.com</email>
</author>
<published>2020-07-03T17:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=8de6f9af46f12fe3b2a0871523f6df13c4b39e34'/>
<id>8de6f9af46f12fe3b2a0871523f6df13c4b39e34</id>
<content type='text'>
Check scheme instead of effective url so that user may abbreviate
DEBUGINFOD_URL. Add one test for scheme free http url.

Notice that libcurl does not provide an almighty scheme free url
support, /path/to/something without FILE:// can not be recognized
in most circumstances, therefore for the neatness of our code
structure, DEBUGINFOD_ URL of scheme "FILE" must be input as URI.

Signed-off-by: Alice Zhang &lt;alizhang@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check scheme instead of effective url so that user may abbreviate
DEBUGINFOD_URL. Add one test for scheme free http url.

Notice that libcurl does not provide an almighty scheme free url
support, /path/to/something without FILE:// can not be recognized
in most circumstances, therefore for the neatness of our code
structure, DEBUGINFOD_ URL of scheme "FILE" must be input as URI.

Signed-off-by: Alice Zhang &lt;alizhang@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>debuginfod: Add --disable-libdebuginfod and --enable-libdebuginfod=dummy.</title>
<updated>2020-07-03T23:30:07+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-19T17:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=f7f0cdc59a13780938ae3f578955737a75e60ea9'/>
<id>f7f0cdc59a13780938ae3f578955737a75e60ea9</id>
<content type='text'>
Make it possible to build just the debuginfod client or to create a
dummy libdebuginfod that doesn't link against libcurl. The dummy library
can be used for bootstrapping. For testing purposes you can also build
debuginfod against the dummy libdebuginfod but then the debuginfod
server will not be able to do delegation.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it possible to build just the debuginfod client or to create a
dummy libdebuginfod that doesn't link against libcurl. The dummy library
can be used for bootstrapping. For testing purposes you can also build
debuginfod against the dummy libdebuginfod but then the debuginfod
server will not be able to do delegation.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Use #/usr/bin/env bash in scripts that use bash</title>
<updated>2020-06-15T22:32:30+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-15T22:25:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=bca87ed8a200b8845e82b06fa94e69cd637dfea3'/>
<id>bca87ed8a200b8845e82b06fa94e69cd637dfea3</id>
<content type='text'>
Some systems don't have bash in /bin.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some systems don't have bash in /bin.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add GCOV flags when necessary.</title>
<updated>2020-06-11T17:07:28+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-11T17:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=3eaa4421b2422452b40547aab3e8da0749990ef9'/>
<id>3eaa4421b2422452b40547aab3e8da0749990ef9</id>
<content type='text'>
The nlist-test has a special compile rule, make sure it gets the
GCOV flags when configuring with --enable-gcov.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The nlist-test has a special compile rule, make sure it gets the
GCOV flags when configuring with --enable-gcov.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: Explicitly print weak 'V' or 'T' and common 'C' symbols.</title>
<updated>2020-06-06T23:02:52+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-06-06T23:02:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=76ff94dce7ee8dd88c502bc0bbfc8dea15efea5b'/>
<id>76ff94dce7ee8dd88c502bc0bbfc8dea15efea5b</id>
<content type='text'>
Mimic binutils nm for bsd and posix formats which uses 'V' for weak
symbols, 'C' for common symbols and 'T' for weak functions. Also fix
some formatting issues. Don't print undefined addresses as zeros, but
make sure there is enough padding instead. Just print UNIQUE for
GNU_UNIQUE to make it fit 6 chars, like other binding names in sysv
format.

https://sourceware.org/bugzilla/show_bug.cgi?id=25227

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mimic binutils nm for bsd and posix formats which uses 'V' for weak
symbols, 'C' for common symbols and 'T' for weak functions. Also fix
some formatting issues. Don't print undefined addresses as zeros, but
make sure there is enough padding instead. Just print UNIQUE for
GNU_UNIQUE to make it fit 6 chars, like other binding names in sysv
format.

https://sourceware.org/bugzilla/show_bug.cgi?id=25227

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Make sure to not call memcmp with NULL arguments.</title>
<updated>2020-05-14T12:30:57+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2020-05-08T22:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=2c167d49aa6db14a458bc8c33717efdd965c04c3'/>
<id>2c167d49aa6db14a458bc8c33717efdd965c04c3</id>
<content type='text'>
GCC10 -fanalyzer thinks we are too clever:

elfputzdata.c: In function ‘main’:
elfputzdata.c:178:8: warning: use of possibly-NULL ‘orig_buf’ where
                     non-null expected [CWE-690]
                     [-Wanalyzer-possible-null-argument]
  178 |     &amp;&amp; memcmp (orig_buf, d-&gt;d_buf, orig_size) == 0)

orig_buf can only be NULL when orig_size is zero, but it might still
be undefined behaviour. So don't try to be too smart and just check
whether we actually have an buffer.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC10 -fanalyzer thinks we are too clever:

elfputzdata.c: In function ‘main’:
elfputzdata.c:178:8: warning: use of possibly-NULL ‘orig_buf’ where
                     non-null expected [CWE-690]
                     [-Wanalyzer-possible-null-argument]
  178 |     &amp;&amp; memcmp (orig_buf, d-&gt;d_buf, orig_size) == 0)

orig_buf can only be NULL when orig_size is zero, but it might still
be undefined behaviour. So don't try to be too smart and just check
whether we actually have an buffer.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
