lsb

.gnu_debuglink section

Bug #1329922 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
lsb
Confirmed
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

This is taken from the gdb doco

 15.2 Debugging Information in Separate Files
http://sources.redhat.com/gdb/current/onlinedocs/gdb_16.html#SEC147

this is found in RHEL 4, at least.

A debug link is a special section of the executable file named .gnu_debuglink.
The section must contain:

    * A filename, with any leading directory components removed, followed by a
zero byte,
    * zero to three bytes of padding, as needed to reach the next four-byte
boundary within the section, and
    * a four-byte CRC checksum, stored in the same endianness used for the
executable file itself. The checksum is computed on the debugging information
file's full contents by the function given below, passing zero as the crc argument.

Any executable file format can carry a debug link, as long as it can contain a
section named .gnu_debuglink with the contents described above.

The debugging information file itself should be an ordinary executable,
containing a full set of linker symbols, sections, and debugging information.
The sections of the debugging information file should have the same names,
addresses and sizes as the original file, but they need not contain any data --
much like a .bss section in an ordinary executable.

As of December 2002, there is no standard GNU utility to produce separated
executable / debugging information file pairs. Ulrich Drepper's `elfutils'
package, starting with version 0.53, contains a version of the strip command
such that the command strip foo -f foo.debug removes the debugging information
from the executable file `foo', places it in the file `foo.debug', and leaves
behind a debug link in `foo'.

Since there are many different ways to compute CRC's (different polynomials,
reversals, byte ordering, etc.), the simplest way to describe the CRC used in
.gnu_debuglink sections is to give the complete code for a function that
computes it:

unsigned long
<rest of code deleted>
[reply] [-] Comment 1

Tags: lsb rpm
Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.