This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ELF shared library status.



	OK, last night I finally got it working.  I was able to use the GNU
linker to generate an ELF shared library (the iBCS2 ELF libc for linux), and it
actually works for everything I have thrown at it so far, including emacs and a
couple of simpleminded X applications.  I have already sent Ian the diffs, and
when he gets some time (hopefully fairly soon) they will be integrated into the
source tree at cygnus.

	One very interesting thing is that the library generated by GNU ld is
about 33Kb smaller than the one generated by the SVr4 linker.  I think the main
reason for this is that the SVr4 linker has been generating a unified symbol
table, and when you strip this binary it cannot remove the local symbols.
The GNU linker has been generating two sets of symbol tables, and the .dynsym
section only contains that which is needed for dynamic linking.  Thus when you
strip it, you end up with something that is much closer to the minimum size.

	There is one problem area - the debugging information needs some work
in the relocations department - if you try and load the shared library into the
debugger you get some nonsense messages from gdb.  In principle this should not
be that difficult to fix, and will only be an issue when you try and directly
debug a shared library.

	There are a few new rough edges with some of the binutils - these
should also be relatively easy to iron out.

	I have uploaded diffs (against the 940707 snapshot at cygnus) to tsx-11
in pub/linux/packages/GCC/private/dll/elflib??.diff or something close to that
(I cannot remember the exact name).  The only thing that is missing from this
file are the patches to gas to accept PIC assembly operands (Ken has the
patches, and will hopefully be integrated soon).  So far, every test that I
have run with the linker has used .o files generated by the SVr4 assembler - I
only want to test/debug one tool at a time, thank you.

	I will be away from my computer most of the weekend :-).

-Eric