<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/elfutils.git/src/ChangeLog, branch debuginfod</title>
<subtitle>sourceware.org: git/elfutils.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/'/>
<entry>
<title>unstrip: Don't try to write extra bogus versym data.</title>
<updated>2019-10-26T00:21:38+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-10-19T12:37:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=da5a32a400da6a03a96f0aff10aff2d86bd9baad'/>
<id>da5a32a400da6a03a96f0aff10aff2d86bd9baad</id>
<content type='text'>
If the sh_entsize of the symver section was bogus (bigger than necessary)
then some bogus data would be written out (except that then fails because
pwrite would probably fail). Fix that by ignoring the bogus sh_entsize
and use the actual symver data size.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the sh_entsize of the symver section was bogus (bigger than necessary)
then some bogus data would be written out (except that then fails because
pwrite would probably fail). Fix that by ignoring the bogus sh_entsize
and use the actual symver data size.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unstrip: Add sanity check for bogus sh_offset of allocated sections.</title>
<updated>2019-10-26T00:13:47+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-10-20T15:26:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=9d3003f6b0baa94a53013fbefb4f6542bc532a6c'/>
<id>9d3003f6b0baa94a53013fbefb4f6542bc532a6c</id>
<content type='text'>
unstrip tries to preserve any allocated section offset in an
executable or shared library. If the offset is extremely large that
would cause the disk to fill up because we will write out a file with
lots of padding to put the section contents at that particular
offset. Add a sanity check that makes sure we just error out if there
is such a bogus offset by checking that no offset is larger than the
original ELF file size.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unstrip tries to preserve any allocated section offset in an
executable or shared library. If the offset is extremely large that
would cause the disk to fill up because we will write out a file with
lots of padding to put the section contents at that particular
offset. Add a sanity check that makes sure we just error out if there
is such a bogus offset by checking that no offset is larger than the
original ELF file size.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unstrip: Add various checks for bad input data.</title>
<updated>2019-10-26T00:01:19+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-10-21T08:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=90f4bb30381b0354b8b40cd09e68005713bfd69a'/>
<id>90f4bb30381b0354b8b40cd09e68005713bfd69a</id>
<content type='text'>
There were various ways to crash eu-unstrip with bad ELF input
data. Add various tests against bad data and allocate some structures
on the heap instead of on the stack.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were various ways to crash eu-unstrip with bad ELF input
data. Add various tests against bad data and allocate some structures
on the heap instead of on the stack.

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

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>elflint, readelf: enhance error diagnostics</title>
<updated>2019-10-04T07:55:21+00:00</updated>
<author>
<name>Dmitry V. Levin</name>
<email>ldv@altlinux.org</email>
</author>
<published>2019-09-30T11:39:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=47780c9e4cbd312da6d93c9d70c554d34d83dd05'/>
<id>47780c9e4cbd312da6d93c9d70c554d34d83dd05</id>
<content type='text'>
When an input file cannot be opened, include its name
into the error diagnostics.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an input file cannot be opened, include its name
into the error diagnostics.

Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>readelf: Add --dyn-sym option.</title>
<updated>2019-09-10T13:45:53+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-09-02T22:03:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=08986c35d7bee335f447f542918bbbc2bdd638a9'/>
<id>08986c35d7bee335f447f542918bbbc2bdd638a9</id>
<content type='text'>
It is already possible to select the symbol table to print by name,
using --symbols=SECTION. This allows printing the dynamic symbol table
with --symbols=.dynsym. binutils readelf allows printing just the
dynamic symbol table by type using --dyn-sym. Add the same option
and document it. Also add a testcase to show --symbols=.dynsym and
--dyn-sym produce the same output.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is already possible to select the symbol table to print by name,
using --symbols=SECTION. This allows printing the dynamic symbol table
with --symbols=.dynsym. binutils readelf allows printing just the
dynamic symbol table by type using --dyn-sym. Add the same option
and document it. Also add a testcase to show --symbols=.dynsym and
--dyn-sym produce the same output.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>readelf: Actually dump hex or strings when -p or -x get section number.</title>
<updated>2019-08-29T16:05:34+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-08-27T14:09:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=1b9d343a8cbe14c2b2a3adebc962b2634a2be98a'/>
<id>1b9d343a8cbe14c2b2a3adebc962b2634a2be98a</id>
<content type='text'>
The readelf code did parse section numbers, but then failed to actually
dump the section found. Fixed by actually calling the dump function
(either the hex or string variant). Add testcase for readelf -x num.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The readelf code did parse section numbers, but then failed to actually
dump the section found. Fixed by actually calling the dump function
(either the hex or string variant). Add testcase for readelf -x num.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nm: Fix latent memory leak in show_symbols.</title>
<updated>2019-08-29T15:46:52+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-08-29T15:46:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=df33285b60290fadefd140ee2fe616f750105d2f'/>
<id>df33285b60290fadefd140ee2fe616f750105d2f</id>
<content type='text'>
If there are just a handful of symbols then memory for them is
allocated on the stack, otherwise the memory is malloced. So before
freeing the memory we need to check the number of entries to know if
the memory was heap allocated or not. But since not all entries might
be used we might have decreased the number of entries to the number
we will actually show. Remember the original symbol entries to not
have a memory leak.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there are just a handful of symbols then memory for them is
allocated on the stack, otherwise the memory is malloced. So before
freeing the memory we need to check the number of entries to know if
the memory was heap allocated or not. But since not all entries might
be used we might have decreased the number of entries to the number
we will actually show. Remember the original symbol entries to not
have a memory leak.

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't use dlopen() for libebl modules</title>
<updated>2019-08-29T11:30:30+00:00</updated>
<author>
<name>Omar Sandoval</name>
<email>osandov@fb.com</email>
</author>
<published>2019-08-26T17:51:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=4f937e24dc7ad1820fc7c99a6dd6422657f14666'/>
<id>4f937e24dc7ad1820fc7c99a6dd6422657f14666</id>
<content type='text'>
Currently, architecture-specific code for libebl exists in separate
libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime.
This makes it impossible to have standalone, statically-linked binaries
which use libdwfl if they depend on any architecture-specific
functionality. Additionally, when these libraries cannot be found, the
failure modes are non-obvious. So, let's get rid of libebl_$arch.so and
move it all into libdw.so/libdw.a, which simplifies things considerably.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, architecture-specific code for libebl exists in separate
libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime.
This makes it impossible to have standalone, statically-linked binaries
which use libdwfl if they depend on any architecture-specific
functionality. Additionally, when these libraries cannot be found, the
failure modes are non-obvious. So, let's get rid of libebl_$arch.so and
move it all into libdw.so/libdw.a, which simplifies things considerably.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>readelf: Add optional "SECTION" argument for --notes.</title>
<updated>2019-08-26T09:28:17+00:00</updated>
<author>
<name>Mark Wielaard</name>
<email>mark@klomp.org</email>
</author>
<published>2019-08-21T10:28:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=347e6b7a38f78c758e9ab0d3372222ccd4a4f6d9'/>
<id>347e6b7a38f78c758e9ab0d3372222ccd4a4f6d9</id>
<content type='text'>
There are multiple sections that can contain ELF Notes. It is sometimes
nice to just list the notes from a specific section.

  -n, --notes[=SECTION]      Display the ELF notes

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are multiple sections that can contain ELF Notes. It is sometimes
nice to just list the notes from a specific section.

  -n, --notes[=SECTION]      Display the ELF notes

Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>elfclassify: New tool to analyze ELF objects.</title>
<updated>2019-08-13T11:35:17+00:00</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2019-08-13T11:27:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/elfutils.git/commit/?id=3f489b5c7c78df6d52f8982f79c36e9a220e8951'/>
<id>3f489b5c7c78df6d52f8982f79c36e9a220e8951</id>
<content type='text'>
Usage: elfclassify [OPTION...] FILE...
Determine the type of an ELF file.

All of the classification options must apply at the same time to a
particular file.  Classification options can be negated using a
"--not-" prefix.

Since modern ELF does not clearly distinguish between programs and
dynamic shared objects, you should normally use either --executable or
--shared to identify the primary purpose of a file.  Only one of the
--shared and --executable checks can pass for a file.

If you want to know whether an ELF object might a program or a shared
library (but could be both), then use --program or --library. Some ELF
files will classify as both a program and a library.

If you just want to know whether an ELF file is loadable (as program
or library) use --loadable.  Note that files that only contain
(separate) debug information (--debug-only) are never --loadable (even
though they might contain program headers).  Linux kernel modules are
also not --loadable (in the normal sense).

Without any of the --print options, the program exits with status 0 if
the requested checks pass for all input files, with 1 if a check fails
for any file, and 2 if there is an environmental issue (such as a file
read error or a memory allocation error).

When printing file names, the program exits with status 0 even if no
file names are printed, and exits with status 2 if there is an
environmental issue.

On usage error (e.g. a bad option was given), the program exits with a
status code larger than 2.

The --quiet or -q oose_filestion suppresses some error warning output,
but doesn't change the exit status.

Classification options
  --core                 File is an ELF core dump file
  --debug-only           File is a debug only ELF file (separate .debug,
                         .dwo or dwz multi-file)
  --elf                  File looks like an ELF object or archive/static
                         library (default)
  --elf-archive          File is an ELF archive or static library
  --elf-file             File is an regular ELF object (not an
                         archive/static library)
  --executable           File is (primarily) an ELF program executable (not
                         primarily a DSO)
  --library              File is an ELF shared object (DSO) (might also be
                         an executable)
  --linux-kernel-module  File is a linux kernel module
  --loadable             File is a loadable ELF object (program or shared
                         object)
  --program              File is an ELF program executable (might also be a
                         DSO)
  --shared               File is (primarily) an ELF shared object (DSO)
                         (not primarily an executable)
  --unstripped           File is an ELF file with symbol table or .debug_*
                         sections and can be stripped further

Input flags
  -f, --file             Only classify regular (not symlink nor special
                         device) files
  --no-stdin             Do not read files from standard input (default)
  --stdin                Also read file names to process from standard
                         input, separated by newlines
  --stdin0               Also read file names to process from standard
                         input, separated by ASCII NUL bytes
  -z, --compressed       Try to open compressed files or embedded (kernel)
                         ELF images

Output flags
  --matching             If printing file names, print matching files
                         (default)
  --no-print             Do not output file names
  --not-matching         If printing file names, print files that do not
                         match
  --print                Output names of files, separated by newline
  --print0               Output names of files, separated by ASCII NUL

Additional flags
  -q, --quiet            Suppress some error output (counterpart to
                         --verbose)
  -v, --verbose          Output additional information (can be specified
                         multiple times)

  -?, --help             Give this help list
      --usage            Give a short usage message
  -V, --version          Print program version

Report bugs to https://sourceware.org/bugzilla.

Signed-off-by: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Mark Wielaard &lt;mark@klomp.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Usage: elfclassify [OPTION...] FILE...
Determine the type of an ELF file.

All of the classification options must apply at the same time to a
particular file.  Classification options can be negated using a
"--not-" prefix.

Since modern ELF does not clearly distinguish between programs and
dynamic shared objects, you should normally use either --executable or
--shared to identify the primary purpose of a file.  Only one of the
--shared and --executable checks can pass for a file.

If you want to know whether an ELF object might a program or a shared
library (but could be both), then use --program or --library. Some ELF
files will classify as both a program and a library.

If you just want to know whether an ELF file is loadable (as program
or library) use --loadable.  Note that files that only contain
(separate) debug information (--debug-only) are never --loadable (even
though they might contain program headers).  Linux kernel modules are
also not --loadable (in the normal sense).

Without any of the --print options, the program exits with status 0 if
the requested checks pass for all input files, with 1 if a check fails
for any file, and 2 if there is an environmental issue (such as a file
read error or a memory allocation error).

When printing file names, the program exits with status 0 even if no
file names are printed, and exits with status 2 if there is an
environmental issue.

On usage error (e.g. a bad option was given), the program exits with a
status code larger than 2.

The --quiet or -q oose_filestion suppresses some error warning output,
but doesn't change the exit status.

Classification options
  --core                 File is an ELF core dump file
  --debug-only           File is a debug only ELF file (separate .debug,
                         .dwo or dwz multi-file)
  --elf                  File looks like an ELF object or archive/static
                         library (default)
  --elf-archive          File is an ELF archive or static library
  --elf-file             File is an regular ELF object (not an
                         archive/static library)
  --executable           File is (primarily) an ELF program executable (not
                         primarily a DSO)
  --library              File is an ELF shared object (DSO) (might also be
                         an executable)
  --linux-kernel-module  File is a linux kernel module
  --loadable             File is a loadable ELF object (program or shared
                         object)
  --program              File is an ELF program executable (might also be a
                         DSO)
  --shared               File is (primarily) an ELF shared object (DSO)
                         (not primarily an executable)
  --unstripped           File is an ELF file with symbol table or .debug_*
                         sections and can be stripped further

Input flags
  -f, --file             Only classify regular (not symlink nor special
                         device) files
  --no-stdin             Do not read files from standard input (default)
  --stdin                Also read file names to process from standard
                         input, separated by newlines
  --stdin0               Also read file names to process from standard
                         input, separated by ASCII NUL bytes
  -z, --compressed       Try to open compressed files or embedded (kernel)
                         ELF images

Output flags
  --matching             If printing file names, print matching files
                         (default)
  --no-print             Do not output file names
  --not-matching         If printing file names, print files that do not
                         match
  --print                Output names of files, separated by newline
  --print0               Output names of files, separated by ASCII NUL

Additional flags
  -q, --quiet            Suppress some error output (counterpart to
                         --verbose)
  -v, --verbose          Output additional information (can be specified
                         multiple times)

  -?, --help             Give this help list
      --usage            Give a short usage message
  -V, --version          Print program version

Report bugs to https://sourceware.org/bugzilla.

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