This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA PATCH] Fix --dynamic-list test's workaround for http://bugs.python.org/issue4434.


On 03/11/2013 06:14 PM, Jan Kratochvil wrote:
> On Fri, 08 Mar 2013 00:14:00 +0100, Pedro Alves wrote:
>> After a chat on IRC, I noticed that my gdb binary was linking with
>> -Wl,--export-dynamic instead of the better -Wl,--dynamic-list.
> 
> I agree with this fix (with the bit LDFLAGS -> LIBS).

Ah yes, LIBS, of course.  Please go ahead.

> 
> But in practice it does not change anything as the full linking commandline
> also contains
> 	LINKFORSHARED=-Xlinker -export-dynamic
> from
> 	/usr/lib/python2.7/config/Makefile
> which overrides it:
> 	../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'

?

-- 
Pedro Alves


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