This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Define __start/__stop symbols when there is only a dynamic def


Hi,

On Mon, 29 Jan 2018, H.J. Lu wrote:

> [hjl@gnu-6 orphan-4]$ make
> cc -g   -c -o app.o app.c
> cc -B./ -o app app.o liborphan.so -ldl -Wl,-R,.
> ./app
> [hjl@gnu-6 orphan-4]$
> 
> It looks good to me.  What am I missing?

You missed that my testcase was the readelf output, not the runtime 
behaviour.  I didn't bother to transform it into a runtime 
testcase, the problem is obvious from readelf.  (You'd need dlsym to make 
this into a runtime testcase, because the whole point of the excercise is 
that app itself doesn't contain any explicit references to these symbols 
but still must contain definition of them)


Ciao,
Michael.


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