Bug 518768 - gas doesn't provide correct ELF ABI for object with unique symbols
Summary: gas doesn't provide correct ELF ABI for object with unique symbols
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-22 16:44 UTC by Ulrich Drepper
Modified: 2009-11-09 15:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-09 15:23:03 UTC


Attachments (Terms of Use)
Always set the OSABI field to ELFOSABI_LINUX if unique symbols are used (1.50 KB, patch)
2009-09-29 15:04 UTC, Nick Clifton
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Sourceware 10549 None None None Never

Description Ulrich Drepper 2009-08-22 16:44:20 UTC
Description of problem:
Assemble this file

	.type a, @gnu_unique_object
a:	.long 0
	.size a, .-a

and the result will have on Linux/x86-64 a header which has an ELF header with
no special OSABI marker.  But STB_GNU_UNIQUE requires that.

gas should also notice the STB_GNU_UNIQUE binding and change the OSABI to
ELFOSABI_LINUX, just as ld does.


Version-Release number of selected component (if applicable):
binutils-2.19.51.0.14-31

How reproducible:
always

Steps to Reproduce:
1.see above
2.
3.
  
Actual results:
No special ABI indicated

Expected results:
ELFOSABI_LINUX used

Additional info:

Comment 1 Nick Clifton 2009-09-29 15:04:52 UTC
Created attachment 363029 [details]
Always set the OSABI field to ELFOSABI_LINUX if unique symbols are used

Comment 2 Nick Clifton 2009-09-29 15:06:42 UTC
Hi Uli,

This bug is a duplicate of the binutils PR 10549.  (Or possibly the other way around).  Anyway the uploaded patch should resolve the problem.  Please let me know if you are happy with it.

Cheers
  Nick

Comment 3 Ulrich Drepper 2009-09-29 15:28:03 UTC
(In reply to comment #2)
> Anyway the uploaded patch should resolve the problem.  Please let me
> know if you are happy with it.

It looks good to me.  Once a patched binutils is available we'll easily see whether the patch works.  Thanks.

Comment 4 Nick Clifton 2009-10-13 08:04:07 UTC
Hi Uli,

  The latest development binutils rpm now contains this patch.

Cheers
  Nick

Comment 5 Jakub Jelinek 2009-11-09 10:38:49 UTC
Isn't this already in F-13 binutils (== RHEL6 binutils ATM)?

Comment 6 Nick Clifton 2009-11-09 11:04:36 UTC
(In reply to comment #5)
> Isn't this already in F-13 binutils (== RHEL6 binutils ATM)?  

Yes it is. Or rather the patch that I believe will fix this problem is in F-13.  I am waiting for feedback from Uli as to whether it fully solves the problem or not.

Cheers
  Nick

Comment 7 Ulrich Drepper 2009-11-09 15:23:03 UTC
I verified it works in rawhide.  This fix should be in RHEL6.  Will RHEL6 get a rebase on rawhide?


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