Bug 1110249 - elflint run-elflint-self.sh failure for ppc64le ELFv2 abi
Summary: elflint run-elflint-self.sh failure for ppc64le ELFv2 abi
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F-ExcludeArch-ppc64le, PPC64LETracker
TreeView+ depends on / blocked
 
Reported: 2014-06-17 09:52 UTC by Menanteau Guy
Modified: 2014-09-25 10:41 UTC (History)
8 users (show)

Fixed In Version: elfutils-0.160-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-11 20:13:02 UTC


Attachments (Terms of Use)
log error generated by run-elflint-self.sh test (89.69 KB, text/x-log)
2014-06-17 09:52 UTC, Menanteau Guy
no flags Details
ppc64-abiv2 patch (4.59 KB, patch)
2014-07-02 12:41 UTC, Menanteau Guy
no flags Details | Diff

Description Menanteau Guy 2014-06-17 09:52:55 UTC
Created attachment 909504 [details]
log error generated by run-elflint-self.sh test

Description of problem:
runnung make check of elfutils-0.159 on arch ppc64le leads to a failure on
run-elflint-self.sh test.
I attached the test-suite.log file created during the test.

It seems to me there are three diffrent problems but all linked to abiv2 changes, so please let me know if you prefer I open three different bugs.

You can reproduce to do a make check of elfutils or using rpmbuild like
rpmbuild --target ppc64le on a machine ppc64 little endian


Three type of problems I saw are like (see test-suite.log attached file):
1:  section [ 5] '.dynsym': symbol 76: unknown bit set in st_other
2:  section [20] '.dynamic': entry 20: unknown tag
3:  section [34] '.symtab': symbol 138: st_value out of bounds

The first one, "'.dynsym': symbol 76: unknown bit set in st_other"
is relative to the new st_other entry [<localentry>: 8] created by abiv2.
applying readelf --dyn-syms addr2line
gives
76: 0000000010001730     0 FUNC    GLOBAL DEFAULT [<localentry>: 8]    11 _init
I t seems currently not recognized by elflint.

The second problem, "'.dynamic': entry 20: unknown tag" is relative to
a new tag PPC64_OPT
applying readelf --dynamic addr2line
gives for entry 20
0x0000000070000003 (PPC64_OPT)          0x0
it seems this tag have been introduced by abiv2 to replace PPC_TLSOPT tag but I am not so sure.

The third problem, "'.symtab': symbol 138: st_value out of bounds"
is relative to st_value .TOC.
readelf --syms ..addr2line
gives
138: 0000000010028008     0 OBJECT  LOCAL  DEFAULT   22 .TOC.
this let me think .TOC. is not correctly handled by elflint.

Note that there is not an abiv2 docummentation available at this time.

Comment 1 Mark Wielaard 2014-06-17 21:31:43 UTC
> It seems to me there are three diffrent problems but all linked to abiv2
> changes, so please let me know if you prefer I open three different bugs.

Lets just keep one bug open for ppc64le ELFv2 abi support for now.
I am actually happily surprised this is the only failing testcase.

Comment 2 Menanteau Guy 2014-06-27 17:03:12 UTC
I am working to make a patch to resolve 3 problems I described, but I just realized I forgot an other serie as following:

section [ 2] '.rela.text': relocation 0: invalid type
section [ 2] '.rela.text': relocation 1: invalid type
section [ 2] '.rela.text': relocation 21: invalid type
section [ 2] '.rela.text': relocation 22: invalid type
section [ 2] '.rela.text': relocation 64: invalid type
section [ 2] '.rela.text': relocation 65: invalid type
section [ 2] '.rela.text': relocation 588: invalid type
section [ 2] '.rela.text': relocation 589: invalid type
section [ 2] '.rela.text': relocation 625: invalid type
section [ 2] '.rela.text': relocation 626: invalid type
section [ 9] '.rela.text.unlikely': relocation 0: invalid type
section [ 9] '.rela.text.unlikely': relocation 1: invalid type
section [ 9] '.rela.text.unlikely': relocation 44: invalid type
section [ 9] '.rela.text.unlikely': relocation 45: invalid type
section [ 9] '.rela.text.unlikely': relocation 48: invalid type
section [ 9] '.rela.text.unlikely': relocation 49: invalid type
section [11] '.rela.text.startup': relocation 0: invalid type
section [11] '.rela.text.startup': relocation 1: invalid type
*** failure in /home/root/rpmbuild/BUILD/elfutils-0.159/src/elflint --quiet --gnu-ld /home/root/rpmbuild/BUILD/elfutils-0.159/src/strip.o

working on these too.

Comment 3 Menanteau Guy 2014-07-02 12:41:06 UTC
I corrected above problems and passed all tested using ppc64-abiv2 patch in attachment.
Please could you consider it.
Thanks

Comment 4 Menanteau Guy 2014-07-02 12:41:55 UTC
Created attachment 914172 [details]
ppc64-abiv2 patch

Comment 5 Mark Wielaard 2014-07-11 20:13:02 UTC
Thanks this has now been incorporated upstream and a new build with those patches applied has been made:
http://ppc.koji.fedoraproject.org/kojifiles/packages/elfutils/0.159/5.fc21/data/logs/ppc64le/build.log

Comment 6 Fedora Update System 2014-09-08 15:05:44 UTC
elfutils-0.160-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/elfutils-0.160-1.fc20

Comment 7 Fedora Update System 2014-09-08 15:08:54 UTC
elfutils-0.160-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/elfutils-0.160-1.fc19

Comment 8 Fedora Update System 2014-09-19 10:04:22 UTC
elfutils-0.160-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-09-25 10:41:56 UTC
elfutils-0.160-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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