Bug 1395286 - elfutils: Support rewriting source file paths in static libraries
Summary: elfutils: Support rewriting source file paths in static libraries
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1395280
TreeView+ depends on / blocked
 
Reported: 2016-11-15 15:54 UTC by Florian Weimer
Modified: 2019-06-10 21:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2016-11-15 15:54:30 UTC
To make the debugging information in static libraries more useful when used together with the source files from the -debuginfo package, we need to rewrite the static library to use paths under /usr/src/debug, just as we do while we strip the debugging information from shared objects and applications.

Comment 1 Mark Wielaard 2016-11-15 16:00:19 UTC
This is really part of rpm debugedit. But lets keep it attached to elfutils for now. Currently eu-strip doesn't handle ar archives at all. Although there is some code that appears to iterate through the archive and do the right thing (handle_ar), this code is never used because src/strip.c also contains:

    case ELF_K_AR:
      /* It is not possible to strip the content of an archive direct
         the output to a specific file.  */
      if (unlikely (output_fname != NULL || debug_fname != NULL))
        {
          error (0, 0, gettext ("%s: cannot use -o or -f when stripping archive"),
                 fname);
          result = 1;
        }
      else
        {
          /* We would like to support ar archives, but currently it just
             doesn't work at all since we call elf_clone on the members
             which doesn't really support ar members.
             result = handle_ar (fd, elf, NULL, fname,
                                 preserve_dates ? tv : NULL);
           */
          error (0, 0, gettext ("%s: no support for stripping archive"),
                 fname);
          result = 1;
        }
      break;


Note You need to log in before you can comment on or make changes to this bug.