release soonish
by Roland McGrath
Though overall activity has been fairly low since about last March (wonder
why ;-), there has been more than enough change to warrant a release.
In particular 0.152 doesn't build happily with the newest compilers.
In the absence of strenuous and explained objection, I'm going to merge the
robustify branch into the trunk.
I've just completed -D/-U support in ar/ranlib and the
--enable-deterministic-archvies configure option, for parity
with current binutils.
Mark is going to look into a new elflint-self regression on Fedora 17.
Chances are that is a toolchain bug rather than something for us to fix.
But it needs figured out before we consider a release.
I don't know of anything else anyone intends to work on any time soon.
If you have any plans, please post about them.
Once Mark's investigation comes to a conclusion, I think we should do
0.153.
Thanks,
Roland
11 years, 7 months
--gc-sections not working?
by Jaroslav Sýkora
Hello everybody!
I am developing elf linker for the PicoBlaze CPU target using
elfutils-0.152 (see work-in-progress patches in [1]). PicoBlaze is a
primitive 8-bit RISC core for Xilinx FPGA. It has quite a small
program memory - only 1024 instructions. Hence code size is of primary
concern here.
I've discovered that the option --gc-sections does not work as
intended (see test examples in [2] using i386 target instead). I put
each function in its own section (-ffunction-sections), but when a
single function (section .text.foo) from the object file is included
in the output, all the other sections (.text.bar) are included too. I
also tried linking against an archive: in this case the situation
improves as untouched object files in the archive are not linked in,
but once a function is linked-in, all the other from the same object
file are linked-in too. In [2] I tried it also with GNU binutils and
it works fine.
Some commands from [2] - maybe I am missing an option switch somewhere?
gcc -Wall -O3 -ffunction-sections -m32 -c -o main.o ../src/main.c
elfutils-ld -c elf32-i386.script --gc-sections -L. main.o -lmy -o fin-lib-gc.elf
I very much need the feature to omit unused functions to minimize code size.
Could someone help please?
Bye,
Jara
[1] http://dl.dropbox.com/u/3124266/elfutils-0.152-pblaze-20120112.patch
[2] http://dl.dropbox.com/u/3124266/elfutils-test.tar.gz
--
Space--the final frontier!
11 years, 8 months
Test fails due to lost content of LD_LIBRARY_PATH
by Serge Pavlov
Hi all,
Tests asm-tst4, asm-tst5 and asm-tst6 can fail if binaries produced by
compiler require shared libraries which are not in system directories. For
instance if the binaries are produced by development version of compiler.
In such cases LD_LIBRARY_PATH should contain path to non-standard location
of libraries, but in the aforementioned tests content of this variable is
lost.
The following patch can be used to solve the problem:
diff --git a/tests/asm-tst4.c b/tests/asm-tst4.c
index 54d054c..e6a6210 100644
--- a/tests/asm-tst4.c
+++ b/tests/asm-tst4.c
@@ -102,7 +102,8 @@ main (void)
if (result == 0)
result = WEXITSTATUS (system ("\
-env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst4-out.o"));
+env LD_LIBRARY_PATH=../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH\
+ ../src/elflint -q asm-tst4-out.o"));
/* We don't need the file anymore. */
unlink (fname);
diff --git a/tests/asm-tst5.c b/tests/asm-tst5.c
index 2a8b3f0..f81272b 100644
--- a/tests/asm-tst5.c
+++ b/tests/asm-tst5.c
@@ -114,7 +114,8 @@ main (void)
if (result == 0)
result = WEXITSTATUS (system ("\
-env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst5-out.o"));
+env LD_LIBRARY_PATH=../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH\
+ ../src/elflint -q asm-tst5-out.o"));
/* We don't need the file anymore. */
unlink (fname);
diff --git a/tests/asm-tst6.c b/tests/asm-tst6.c
index bd6a71d..a4f5ac8 100644
--- a/tests/asm-tst6.c
+++ b/tests/asm-tst6.c
@@ -148,7 +148,8 @@ main (void)
if (result == 0)
result = WEXITSTATUS (system ("\
-env LD_LIBRARY_PATH=../libelf ../src/elflint -q asm-tst6-out.o"));
+env LD_LIBRARY_PATH=../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH\
+ ../src/elflint -q asm-tst6-out.o"));
/* We don't need the file anymore. */
unlink (fname);
Thanks,
--Serge
11 years, 8 months