Regression for gdb.fortran/library-module.exp [Re: [RFA] choose symbol from given block's objfile first.]

Joel Brobecker brobecker@adacore.com
Mon May 14 16:57:00 GMT 2012


> Works for me, it is also perfectly defined this way:
> 
> echo -e '#include <stdio.h>\nint x=1;void f(void){printf("lib:%d\\n",x);}'|gcc -x c -fPIC -Wall -shared -o var.so -;echo -e '#include <stdio.h>\nint x=2;extern void f(void);int main(void){printf("main:%d\\n",x);f();return 0;}'|gcc ./var.so -x c -Wall -o var -;./var
> main:2
> lib:2

[Mumbling something about the guy who invented the notion that one-liners
are cool and witty... Your one-liners are easy  to understand, but
always extremely labour intenstive to read]

That being said, thanks for setting me straight. I don't understand
why the linker rejected it for me, and I don't have the code anymore.

So this is another example of copy-relocation? When you say this is
perfectly defined, this looks horrifying to me. It feels like you can
break a shared library's code that way...

-- 
Joel



More information about the Gdb-patches mailing list