Bug 468495 - libbfd reports incorrect sizes of sections.
libbfd reports incorrect sizes of sections.
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-25 04:36 EDT by Søren Sandmann Pedersen
Modified: 2014-06-18 05:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-10-20 09:55:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Testprogram (604 bytes, text/plain)
2008-10-25 04:36 EDT, Søren Sandmann Pedersen
no flags Details

  None (edit)
Description Søren Sandmann Pedersen 2008-10-25 04:36:17 EDT
Created attachment 321493 [details]

libbfd from binutils- reports incorrect sizes of sections. The program I'll attach uses bfd to print the size of the text section of a binary file. When run on /usr/bin/nautilus, it prints 

  dhcp-100-3-183:~% ./a.out /usr/bin/nautilus
  size of text section: 8067da0

This is incorrect. 0x8067da0 is actually the load address.

readelf reports this:

dhcp-100-3-183:~% readelf -S /usr/bin/nautilus 
 [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 [15] .text             PROGBITS        08067da0 025da0 0f8b0c 00  AX  0   0 16
Comment 1 Jan Kratochvil 2008-10-30 09:31:34 EDT
It was broken by me - for Bug 457189
- Turn on 64-bit BFD support for i386, globally enable AC_SYS_LARGEFILE.
for the combination of `-m32 --enable-64-bit-bfd'.

The <bfd.h> file is generated incorrectly.  One needs to remove now the former Jakub's part:
# Fix multilib conflicts of generated values by __WORDSIZE-based expressions.
as now all the targets have BFD_ARCH_SIZE 64.
Comment 2 Jan Kratochvil 2008-10-30 11:04:57 EDT
Committed to the Rawhide CVS:
* Thu Oct 30 2008 Jan Kratochvil <jan.kratochvil@redhat.com>
- Fix %{_prefix}/include/bfd.h on 32-bit hosts due the 64-bit BFD target
  support from (BZ 468495).
Comment 3 Fedora Update System 2008-11-09 21:26:33 EST
libgtop2-2.24.0-2.fc10 has been submitted as an update for Fedora 10.
Comment 4 Fedora Update System 2008-11-22 11:56:54 EST
libgtop2-2.24.0-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libgtop2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/f10/FEDORA-2008-10000
Comment 5 Bug Zapper 2008-11-25 23:13:43 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:

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