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: Regression for gdb.fortran/library-module.exp [Re: [RFA] choose symbol from given block's objfile first.]


> 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


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