Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 614806

Summary: prelink shifts .bss address by .dynbss breaking gdb
Product: Red Hat Enterprise Linux 5 Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: ebachalo, pmuller
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.0.1-27.el5 Doc Type: Bug Fix
Doc Text:
GDB displayed invalid content of some variables. Separate debuginfo files installed for executables caused this behavior when the prelink program optimized the executable with copy relocations. With this update, GDB correctly displays the contents of all the variables.
Story Points: ---
Clone Of: 614659
: 614808 (view as bug list) Environment:
Last Closed: 2011-01-13 23:55:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 614659    
Bug Blocks: 614808    

Description Jan Kratochvil 2010-07-15 10:05:20 UTC
+++ This bug was initially created as a clone of Bug #614659 +++

there is a regression since gdb-7.0 for a combination of:
 * prelinked
 * main executable
 * using separate debug info
 * using copy relocations

Hopefully it may not affect customer applications but it makes debugging of the RHEL components difficult:

int bssvar, *bssvarp = &bssvar;

(gdb) p &bssvar
$1 = (int *) 0x600b54
(gdb) p bssvarp
$2 = (int *) 0x600b50

Version-Release number of selected component (if applicable):
FAIL gdb-7.1-28.fc13.x86_64
FAIL gdb-7.0.1-24.el5
PASS <= FSF GDB 7.0
FAIL >= FSF GDB 7.1

How reproducible:
Always.

Steps to Reproduce:
Updated gdb.base/prelink.exp testcase.

Fix + testcase:
http://sourceware.org/ml/gdb-patches/2010-07/msg00237.html

Comment 3 Jan Kratochvil 2010-09-06 18:43:22 UTC
* Mon Sep  6 2010 Jan Kratochvil <jan.kratochvil> - 7.0.1-27.el5
- Fix prelinked executables with sepdebug and copy relocations (BZ 614806).
  - Fix incorrect relocation of sections with duplicate name (BZ 575737).
  - Fix false warning: section .gnu.liblist not found in ...

Comment 7 Eva Kopalova 2010-11-16 17:14:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
GDB displayed invalid content of some variables. Separate debuginfo files installed for executables caused this behavior when the prelink program optimized the executable with copy relocations. With this update, GDB correctly displays the contents of all the variables.

Comment 9 errata-xmlrpc 2011-01-13 23:55:01 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0099.html