1 Fundamental design decision:
3 - the sizes of external and internal types are assumed to be the same.
4 This leaves byte ordering aside. While assuming this the code can be
5 greatly simplified and speed increases. Since no change violating this
6 assumption is in sight this is believed to be a worthwhile optimization.
8 - the ABI of the backend modules is not guaranteed. Really, no guarantee
9 whatsoever. We are enforcing this in the code. The modules and their
10 users must match. No third-party EBL module are supported or allowed.
11 The only reason there are separate modules is to not have the code for
12 all architectures in all the binaries.
14 - although the public libraries (libasm, libdw) have a stable API and are
15 backwards ABI compatible they, and the elfutils tools, do depend on each
16 others internals, and on internals of libelf to provide their interfaces.
17 So they should always be upgraded in lockstep when packaging the tools
18 and libraries separately. For one example of how to do that, see the
23 - old GNU ld's behavior wrt DSOs seems to be severely broken.
26 y1.o defines foo(), references bar()
28 libbar.so defines bar()
32 gcc -o y y.o -lbar y1.o y2.o
34 uses the bar() definition from libbar.so and does not mention the definition
35 in y2.o at all (no duplicate symbol message). Correct is to use the
40 y1.o defines foo(), references bar()
41 y2.o in liby2.a defines bar()
42 libbar.so defines bar()
46 gcc -o y y.o -lbar y1.o -ly3
48 has to use the definition in -lbar and not pull the definition from liby3.a.
51 - the old linker follows DT_NEEDED entries and adds the objects referenced
52 this way which define a symbol which is needed as a DT_NEEDED to the
53 generated binary. This is wrong since the DT_NEEDED changes the search
54 path in the object (which is breadth first).
57 - the old linker supported extern "C++", extern "java" in version scripts.
58 I believe this implementation is severly broken and needs a redesign
59 (how do wildcards work with these languages*?). Therefore it is left
63 - what should happen if two sections in different files with the same
64 name have different types and/or the flags are different
67 - section names in input files are mostly irrelevant. Exceptions:
69 .comment/SHT_PROGBITS in strip, ld
80 .debug_abbrev > DWARF sections in ld
91 Sections created in output files follow the naming of special section
94 In no place is a section solely indentified by its name. Internal
95 references always use the section index.