Bug 6224 - Binaries sometimes contain empty TEXTREL segment, causing QA warnings
Summary: Binaries sometimes contain empty TEXTREL segment, causing QA warnings
Status: VERIFIED DUPLICATE of bug 6104
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Laurentiu Palcu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-04-24 10:52 UTC by Ross Burton
Modified: 2014-07-30 11:31 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2014-04-24 10:52:30 UTC
Sometimes (haven't been able to identify the cause) binaries are built with relocatable text segments that are in fact empty.  This causes the QA warning to kick in:

WARNING: QA Issue: ELF binary '/data/oc/work/i586-oe-linux/flex/2.5.38-r0/packages-split/flex-ptest/usr/lib/flex/ptest/test-c++-multiple-scanners/test-c++-multiple-scanners' has relocations in .text
WARNING: QA Issue: ELF binary '/data/oc/work/i586-oe-linux/util-linux/2.24.1-r0/packages-split/util-linux/bin/more.util-linux' has relocations in .text
WARNING: QA Issue: ELF binary '/data/oc/work/i586-oe-linux/coreutils/8.22-r0/packages-split/coreutils/bin/sync.coreutils' has relocations in .text

$ objdump  -p /data/oc/work/i586-oe-linux/coreutils/8.22-r0/packages-split/coreutils/bin/sync.coreutils|grep TEXTREL
  TEXTREL              0x00000000

The segment is present, but empty.  scanelf also agrees this isn't right:

$ scanelf -qT /data/oc/work/i586-oe-linux/coreutils/8.22-r0/packages-split/coreutils/bin/sync.coreutils
scanelf: scanelf_file_textrels(): ELF /data/oc/work/i586-oe-linux/coreutils/8.22-r0/packages-split/coreutils/bin/sync.coreutils has TEXTREL markings but doesnt appear to have any real TEXTREL's !?


Would the presence of relocatable text segments cause a performance hit on loading even if empty (so we should fix gcc), or does this have no performance hit so we should check for empty segments in the QA check?
Comment 1 Paul Eggleton 2014-04-24 15:01:07 UTC
Duplicate of 6104 although it is useful to have the extra info.

*** This bug has been marked as a duplicate of bug 6104 ***
Comment 2 Alexandru Georgescu 2014-07-30 11:31:25 UTC
verified as per above comments