Thread (5 messages) flat view 5 messages, 3 authors, 2019-06-14

RE: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v10)

From: David Laight <hidden>
Date: 2019-06-14 13:29:34
Also in: lkml

From: Mathieu Desnoyers
Sent: 14 June 2019 14:02
...
But my original issue remains: if I define a variable called __rseq_handled
within either the main executable or the preloaded library, it overshadows
the libc one:
1) That is the was elf symbol resolution is required to work.
   Otherwise variables like 'errno' (non-thread safe form) wouldn't work.

2) Don't do it then :-)
   Names starting with __ will be reserved (probably 'for the implementation').

The real 'fun' starts because, under some circumstances, looking up a symbol as:
	foo = dlsym(lib_handle, "foo");
Can find the data item instead of the function!
Usually it works (even when foo is global data) because 'lib_handle' refers
to a different symbol table.
But it can go horribly wrong.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help