Summary: | Support for automatic linking via pragma | ||
---|---|---|---|
Product: | binutils | Reporter: | Olaf van der Spek <olafvdspek> |
Component: | gold | Assignee: | Ian Lance Taylor <ian> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | ccoutant, hjl.tools |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Olaf van der Spek
2011-02-12 17:01:49 UTC
Somebody? It sounds like a reasonable idea to me, but to be honest it is not high on my priority list. No existing Unix linker works that way. The gold linker is free software, so brand new ideas like this tend to be written by the people who would like to see them implemented. If you are unable to implement it yourself, I would recommend sending a note to the binutils@sourceware.org mailing list. However, please do not be surprised if nobody takes this up for you. Most free software developers are not waiting around trying to think of something to do. Most of them have far too much to do, and fixing bugs and implementing features that they use themselves is normally going to take priority over implementing a brand new feature which nobody is currently using. I'm not trying to discourage you or to tell you that you are doing anything wrong. I'm just describing my perception of how free software development works. It's driven by volunteers who write code. Ideas are cheap, and there are far more ideas than will ever be implemented. Working code is expensive. I'm also not saying that I will never implement this myself. But I am unlikely to implement it any time soon. Here is a proposal for H/W S/W Attribute: 1. Minimum ISAs: a. Only has EM_386 and EM_X86_64 i. IA32: 1) i386 2) i486 3) Pentium 4) Pentium Pro 5) MMX 6) SSE 7) AVX ii. EM_X86_64: 1) SSE2 2) AVX iii. Atom: 1) SSSE3 b. Executables/DSOs compiled for Atom, … won't run on all x86 platforms: i. Loader can't tell from EM_386/EM_X86_64 to know what ISAs a program requires. 2. GNU binutils supports build attribute and run-time platform compatibility data a. Build attribute: i. Used by linker to set run-time platform compatibility data b. Run-time platform compatibility data i. Used by loader to check platform capabilities required by an executable file/DSO. c. Extend to x86: i. H/W: 1) Required ISAs. a) Define ISAs tags/attributes ii. S/W: 1) Stack size 2) Additional libraries: a) http://sourceware.org/bugzilla/show_bug.cgi?id=12485 iii. Extendable: I think it's a great idea, and have wanted to see this feature in Unix for a long time. Yes, there will need to be some cooperation with gcc, but that could be as simple as a note section, from which the linker could read additional -l options. There will be some additional complexity in determining where in the link order these additional options should be placed: a complete solution would have each library and each relocatable object note all of its direct dependencies so that the linker could construct a topological ordering. At that point, you could in theory just say "ld main.o" and get a working program out. On Mon, Feb 28, 2011 at 8:42 PM, hjl.tools at gmail dot com <sourceware-bugzilla@sourceware.org> wrote: > --- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-28 19:42:19 UTC --- > Here is a proposal for H/W S/W Attribute: This does not sound related to this feature request. Wrong bug number? Olaf |