This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] [RFA PATCH] Fix --dynamic-list test's workaround for http://bugs.python.org/issue4434.
On Mon, 11 Mar 2013 19:35:33 +0100, Pedro Alves wrote:
> Ah yes, LIBS, of course. Please go ahead.
Checked in:
http://sourceware.org/ml/gdb-cvs/2013-03/msg00095.html
> > ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldl -ldl -lncurses -lz -lm -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -lexpat -llzma ../libiberty/libiberty.a build-gnulib/import/libgnu.a -ldl -Wl,--dynamic-list=./proc-service.list
>
> Bummer.
>
> > The real fix to reduce the stripped GDB binary by 1MB of .dynsym back again
> > after it was regressed by Python would be to drop gdb/proc-service.list, add
> > gcc parameter -fvisibility=hidden and mark all the exported symbols (currently
> > in gdb/proc-service.list) by __attribute__ ((visibility ("default"))).
> >
> > At least I hope that -fvisibility=hidden won't break Python on the other hand.
>
> Did you try:
>
> - RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
> + RDYNAMIC='-Wl,--no-export-dynamic -Wl,--dynamic-list=$(srcdir)/proc-service.list'
>
> ?
I did not try as that would break the Python's intention of LINKFORSHARED's
-export-dynamic. While I hope -fvisibility=hidden would not break it as it
applies only to cc1 and not ld.
This is all sure primarily a Python bug breaking any app it links with it,
this discussion is just about how to workaround it when they were unable to
fix it in 2.5 years:
http://bugs.python.org/issue10112
Jan