<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_external_elfutils/libelf, branch android10-s2-release</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>Upgrade elfutils to 142a51944db63f64d4839c65e904df48474dcb12</title>
<updated>2019-03-04T23:28:10+00:00</updated>
<author>
<name>Haibo Huang</name>
<email>hhb@google.com</email>
</author>
<published>2019-03-04T23:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=9567ad261986579307c3501877df8a96d8b1553f'/>
<id>9567ad261986579307c3501877df8a96d8b1553f</id>
<content type='text'>
Test: None
Change-Id: I3910c7fa3a6dfbc3adf12e4214fdda85a4513739
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: None
Change-Id: I3910c7fa3a6dfbc3adf12e4214fdda85a4513739
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Remove unused __elf_xfctstof.</title>
<updated>2019-02-28T22:38:56+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-02-23T19:44:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=e56a09694af1b82e2cae7ecb5d57d76e5d6f973d'/>
<id>e56a09694af1b82e2cae7ecb5d57d76e5d6f973d</id>
<content type='text'>
__elf_xfctstof is only used in case the memory size and file size of ELF
data structures are different. This is never the case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__elf_xfctstof is only used in case the memory size and file size of ELF
data structures are different. This is never the case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Remove unused internal __elf[32|64]_msize functions.</title>
<updated>2019-02-28T22:17:43+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-02-21T23:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=be8080bdd746ac2b07fb0bcad23a9677844bb200'/>
<id>be8080bdd746ac2b07fb0bcad23a9677844bb200</id>
<content type='text'>
Those functions were intended for ELF versions where the memory and
file sizes of data structures are different. They were never used
because libelf depends on the file and memory sizes being equal
(otherwise using mmap wouldn't work).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those functions were intended for ELF versions where the memory and
file sizes of data structures are different. They were never used
because libelf depends on the file and memory sizes being equal
(otherwise using mmap wouldn't work).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: There is just one ELF version.</title>
<updated>2019-02-28T21:41:14+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-02-03T18:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=b9d1678951e13e934759a643040da752573f765f'/>
<id>b9d1678951e13e934759a643040da752573f765f</id>
<content type='text'>
Remove (partially defined out) code and data structures dealing with
multiple ELF versions. There hasn't been a new ELF version in the
last 20 years. Simplify the code a bit by just assuming there will
only be one version (EV_CURRENT == 1).

Simplifies elf_version, gets rid of __libelf_version_initialized.
Removes one (or more) array (version) dimension from various tables
and accessor functions (__elf_xfctstom, shtype_map, __libelf_data_type,
__libelf_type_aligns and __libelf_type_sizes).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove (partially defined out) code and data structures dealing with
multiple ELF versions. There hasn't been a new ELF version in the
last 20 years. Simplify the code a bit by just assuming there will
only be one version (EV_CURRENT == 1).

Simplifies elf_version, gets rid of __libelf_version_initialized.
Removes one (or more) array (version) dimension from various tables
and accessor functions (__elf_xfctstom, shtype_map, __libelf_data_type,
__libelf_type_aligns and __libelf_type_sizes).

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;`
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Handle zero size decompressed data.</title>
<updated>2019-02-19T15:27:40+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-02-19T15:27:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=ff7fe986679b0811591ef6e40cf485fa9f037e07'/>
<id>ff7fe986679b0811591ef6e40cf485fa9f037e07</id>
<content type='text'>
This is a corner case that will most likely never occur in practice,
but we have several testcases that compress and decompress zero sized
data. In that case during decompression we might malloc a buffer of
size zero. It is allowed for malloc to return NULL in that case. But
we do need a non-NULL buffer to return and set as result. So make sure
to always at least allocate one byte. Also make sure that we don't
allocate a zero sized conversion buffer for the data.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a corner case that will most likely never occur in practice,
but we have several testcases that compress and decompress zero sized
data. In that case during decompression we might malloc a buffer of
size zero. It is allowed for malloc to return NULL in that case. But
we do need a non-NULL buffer to return and set as result. So make sure
to always at least allocate one byte. Also make sure that we don't
allocate a zero sized conversion buffer for the data.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Make sure ar_size is terminated when reading ar long names.</title>
<updated>2019-02-14T10:47:59+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-02-14T10:47:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=e32380ecefbb23448541367283d3b94930762986'/>
<id>e32380ecefbb23448541367283d3b94930762986</id>
<content type='text'>
The ar_size is given as a fixed size decimal string, right padded with
spaces.  Make sure we read it properly even if there is no terminating
space. Also sanity check len early if we can.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ar_size is given as a fixed size decimal string, right padded with
spaces.  Make sure we read it properly even if there is no terminating
space. Also sanity check len early if we can.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Upgrade elfutils to e8f8dc465a1fa496aa627a330886c0f70f98d4c0</title>
<updated>2019-02-03T07:45:46+00:00</updated>
<author>
<name>Haibo Huang</name>
<email>hhb@google.com</email>
</author>
<published>2019-02-01T21:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=94f79ee6505d1f20d0c97658cc42bd02f12cc78d'/>
<id>94f79ee6505d1f20d0c97658cc42bd02f12cc78d</id>
<content type='text'>
Test: build
Change-Id: I39f91ff8668f9e17fd4ad3f3ede1ad8a84dffb48
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: build
Change-Id: I39f91ff8668f9e17fd4ad3f3ede1ad8a84dffb48
</pre>
</div>
</content>
</entry>
<entry>
<title>configure: Add new --enable-install-elfh option.</title>
<updated>2019-01-31T22:51:17+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-01-18T13:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=b63007ed58d23afdd64a4e77a447a12b64c5bced'/>
<id>b63007ed58d23afdd64a4e77a447a12b64c5bced</id>
<content type='text'>
We explicitly test (with system-elf-libelf) that our include headers
work with the system elf.h header. But it might be helpful to install
the elf.h file for a private install. Our elf.h header really is just
a copy of the latest glibc elf.h. But it might be newer and include
more constants than the system installed elf.h.

Add a new configure option --enable-install-elfh to install elf.h.
But warn when it is enabled for the default /usr or /usr/local prefix
because it might clash with the glibc/system elf.h header in that case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We explicitly test (with system-elf-libelf) that our include headers
work with the system elf.h header. But it might be helpful to install
the elf.h file for a private install. Our elf.h header really is just
a copy of the latest glibc elf.h. But it might be newer and include
more constants than the system installed elf.h.

Add a new configure option --enable-install-elfh to install elf.h.
But warn when it is enabled for the default /usr or /usr/local prefix
because it might clash with the glibc/system elf.h header in that case.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Correct overflow check in note_xlate.</title>
<updated>2019-01-16T11:25:57+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-01-16T11:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=e65d91d21cb09d83b001fef9435e576ba447db32'/>
<id>e65d91d21cb09d83b001fef9435e576ba447db32</id>
<content type='text'>
We want to make sure the note_len doesn't overflow and becomes shorter
than the note header. But the namesz and descsz checks got the note header
size wrong). Replace the wrong constant (8) with a sizeof cvt_Nhdr (12).

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to make sure the note_len doesn't overflow and becomes shorter
than the note header. But the namesz and descsz checks got the note header
size wrong). Replace the wrong constant (8) with a sizeof cvt_Nhdr (12).

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libelf: Get alignment correct when calling conversion functions.</title>
<updated>2018-11-21T11:30:12+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2018-11-17T23:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_elfutils/commit/?id=5f9fab9efb042d803fcd2546f29613493f55d666'/>
<id>5f9fab9efb042d803fcd2546f29613493f55d666</id>
<content type='text'>
When writing out data that needs to be converted we have to make sure
the conversion function is called on correctly aligned buffers. When
using mmap this might mean we have to convert into a temporarily buffer
if the user wants to write out the section at a location that is not
correctly aligned for the section type.

Older gas would generate misaligned ELF notes for the .version
directive. When copying over such notes using mmap from files with
a different endianness using mmap we would get the alignment of the
conversion destination wrong.

The new testcase would fail with configure --enable-sanitize-undefined
on little endian systems. The GCC undefinited sanitizer caught a similar
issue with testfile1 on big endian systems.

gelf_xlate.h:47:1: runtime error: member access within misaligned address
0x7f8145d770d5 for type 'struct Elf32_Nhdr', which requires 4 byte alignment

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing out data that needs to be converted we have to make sure
the conversion function is called on correctly aligned buffers. When
using mmap this might mean we have to convert into a temporarily buffer
if the user wants to write out the section at a location that is not
correctly aligned for the section type.

Older gas would generate misaligned ELF notes for the .version
directive. When copying over such notes using mmap from files with
a different endianness using mmap we would get the alignment of the
conversion destination wrong.

The new testcase would fail with configure --enable-sanitize-undefined
on little endian systems. The GCC undefinited sanitizer caught a similar
issue with testfile1 on big endian systems.

gelf_xlate.h:47:1: runtime error: member access within misaligned address
0x7f8145d770d5 for type 'struct Elf32_Nhdr', which requires 4 byte alignment

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