Bug 6224

Summary: Binaries sometimes contain empty TEXTREL segment, causing QA warnings
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: Undecided CC: alexandru.c.georgescu, bluelightning, meta.mr.watcher, meta.watcher, raj.khem
Version: 1.7   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

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