<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glibc.git/elf/loadtest.c, branch azanella/aarch64-split-stack</title>
<subtitle>sourceware.org: git/glibc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/'/>
<entry>
<title>Fix elf/loadtest.c build with GCC 8.</title>
<updated>2017-06-27T17:52:42+00:00</updated>
<author>
<name>Joseph Myers</name>
<email>joseph@codesourcery.com</email>
</author>
<published>2017-06-27T17:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=ac782f9e9ab0a39a3054e4c97653fafa8ea47a62'/>
<id>ac782f9e9ab0a39a3054e4c97653fafa8ea47a62</id>
<content type='text'>
Building the testsuite with current GCC mainline fails with:

loadtest.c: In function 'main':
loadtest.c:76:3: error: macro expands to multiple statements [-Werror=multistatement-macros]
   for (map = MAPS; map != NULL; map = map-&gt;l_next)        \
   ^
loadtest.c:165:2: note: in expansion of macro 'OUT'
  OUT;
  ^~~
loadtest.c:164:7: note: some parts of macro expansion are not guarded by this 'if' clause
       if (debug)
       ^~

This seems like a genuine bug, although fairly harmless; it means the
fflush call in the OUT macro is unconditional instead of being inside
the conditional as presumably intended.  This patch makes this macro
use do { } while (0) to avoid the problem.

Tested for x86_64 (testsuite), and with build-many-glibcs.py for
aarch64-linux-gnu with GCC mainline.

	* elf/loadtest.c (OUT): Define using do { } while (0).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Building the testsuite with current GCC mainline fails with:

loadtest.c: In function 'main':
loadtest.c:76:3: error: macro expands to multiple statements [-Werror=multistatement-macros]
   for (map = MAPS; map != NULL; map = map-&gt;l_next)        \
   ^
loadtest.c:165:2: note: in expansion of macro 'OUT'
  OUT;
  ^~~
loadtest.c:164:7: note: some parts of macro expansion are not guarded by this 'if' clause
       if (debug)
       ^~

This seems like a genuine bug, although fairly harmless; it means the
fflush call in the OUT macro is unconditional instead of being inside
the conditional as presumably intended.  This patch makes this macro
use do { } while (0) to avoid the problem.

Tested for x86_64 (testsuite), and with build-many-glibcs.py for
aarch64-linux-gnu with GCC mainline.

	* elf/loadtest.c (OUT): Define using do { } while (0).
</pre>
</div>
</content>
</entry>
<entry>
<title>* elf/tst-tls-dlinfo.c: New file.</title>
<updated>2006-03-01T06:18:49+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>roland@gnu.org</email>
</author>
<published>2006-03-01T06:18:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=d78efd9f369a8fc46229fc9224e10e3781eecc43'/>
<id>d78efd9f369a8fc46229fc9224e10e3781eecc43</id>
<content type='text'>
	* elf/Makefile (tests): Add it.
	($(objpfx)tst-tls-dlinfo): Depend on $(libdl).
	($(objpfx)tst-tls-dlinfo.out): Depend on $(objpfx)tst-tlsmod2.so.

	* dlfcn/dlfcn.h (RTLD_DI_PROFILENAME, RTLD_DI_PROFILEOUT): New enum
	values, reserve unsupported requested names used on Solaris.
	(RTLD_DI_TLS_MODID, RTLD_DI_TLS_DATA): New enum values.
	(RTLD_DI_MAX): Likewise.
	* dlfcn/dlinfo.c (dlinfo_doit): Handle RTLD_DI_TLS_MODID and
	RTLD_DI_TLS_DATA.

	* elf/dl-tls.c (_dl_tls_get_addr_soft): New function.
	* sysdeps/generic/ldsodefs.h: Declare it.
	* elf/Versions (ld: GLIBC_PRIVATE): Add it.
	* elf/link.h (struct dl_phdr_info): New members dlpi_tls_modid,
	dlpi_tls_data.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Fill them in.

	* include/link.h: Don't copy contents from elf/link.h.
	Instead, #include it while #define'ing around link_map.
	* elf/dl-debug.c (_dl_debug_initialize): Add a cast.
	Add bogus extern decl to verify link_map members.
	* elf/loadtest.c (MAPS): New macro, cast _r_debug._r_map.
	(OUT, main): Use it in place of _r_debug._r_map.
	* elf/unload.c: Likewise.
	* elf/unload2.c: Likewise.
	* elf/neededtest.c (check_loaded_objects): Likewise.
	* elf/neededtest2.c (check_loaded_objects): Likewise.
	* elf/neededtest3.c (check_loaded_objects): Likewise.
	* elf/neededtest4.c (check_loaded_objects): Likewise.
	* elf/circleload1.c (check_loaded_objects): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* elf/Makefile (tests): Add it.
	($(objpfx)tst-tls-dlinfo): Depend on $(libdl).
	($(objpfx)tst-tls-dlinfo.out): Depend on $(objpfx)tst-tlsmod2.so.

	* dlfcn/dlfcn.h (RTLD_DI_PROFILENAME, RTLD_DI_PROFILEOUT): New enum
	values, reserve unsupported requested names used on Solaris.
	(RTLD_DI_TLS_MODID, RTLD_DI_TLS_DATA): New enum values.
	(RTLD_DI_MAX): Likewise.
	* dlfcn/dlinfo.c (dlinfo_doit): Handle RTLD_DI_TLS_MODID and
	RTLD_DI_TLS_DATA.

	* elf/dl-tls.c (_dl_tls_get_addr_soft): New function.
	* sysdeps/generic/ldsodefs.h: Declare it.
	* elf/Versions (ld: GLIBC_PRIVATE): Add it.
	* elf/link.h (struct dl_phdr_info): New members dlpi_tls_modid,
	dlpi_tls_data.
	* elf/dl-iteratephdr.c (__dl_iterate_phdr): Fill them in.

	* include/link.h: Don't copy contents from elf/link.h.
	Instead, #include it while #define'ing around link_map.
	* elf/dl-debug.c (_dl_debug_initialize): Add a cast.
	Add bogus extern decl to verify link_map members.
	* elf/loadtest.c (MAPS): New macro, cast _r_debug._r_map.
	(OUT, main): Use it in place of _r_debug._r_map.
	* elf/unload.c: Likewise.
	* elf/unload2.c: Likewise.
	* elf/neededtest.c (check_loaded_objects): Likewise.
	* elf/neededtest2.c (check_loaded_objects): Likewise.
	* elf/neededtest3.c (check_loaded_objects): Likewise.
	* elf/neededtest4.c (check_loaded_objects): Likewise.
	* elf/circleload1.c (check_loaded_objects): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/link.h (struct link_map): Remove l_opencount.  Add l_removed.</title>
<updated>2005-03-18T11:11:42+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2005-03-18T11:11:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=20fe49b93a8807b7e91732d5a1b21a2d99472793'/>
<id>20fe49b93a8807b7e91732d5a1b21a2d99472793</id>
<content type='text'>
	Change type of l_idx to int.
	* elf/dl-close.c: Basically rewrite.  Do not use l_opencount to
	determine whether a DSO has to be unloaded.  Instead compute this
	in this function.
	* elf/dl-deps.c: No need to manipulate l_opencount anymore.
	* elf/dl-lookup.c: Likewise.
	* elf/rtld.c: Likewise
	* elf/dl-open.c: Likewise.  Use l_init_called to determine whether
	object was just loaded.
	* elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount.
	* elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which
	is about to be unloaded as a match.
	(_dl_map_object): Likewise.
	* elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about
	to be unloaded.
	* elf/circleload1.c: Don't use l_opencount anymore.
	* elf/neededtest.c: Likewise.
	* elf/neededtest2.c: Likewise.
	* elf/neededtest3.c: Likewise.
	* elf/neededtest4.c: Likewise.
	* elf/unload.c: Likewise.
	* elf/unload2.c: Likewise.
	* elf/loadtest.c: Likewise.

	* elf/rtld.c: Preloading errors are now never fatal.

2005-03-08  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* elf/Makefile: Add rules to build and run unload5 test.
	* elf/unload5.c: New file.

2005-03-08  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* elf/Makefile: Add rules to build and run unload4 test.
	* elf/unload4.c: New file.
	* elf/unload4mod1.c: New file.
	* elf/unload4mod2.c: New file.
	* elf/unload4mod3.c: New file.
	* elf/unload4mod4.c: New file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Change type of l_idx to int.
	* elf/dl-close.c: Basically rewrite.  Do not use l_opencount to
	determine whether a DSO has to be unloaded.  Instead compute this
	in this function.
	* elf/dl-deps.c: No need to manipulate l_opencount anymore.
	* elf/dl-lookup.c: Likewise.
	* elf/rtld.c: Likewise
	* elf/dl-open.c: Likewise.  Use l_init_called to determine whether
	object was just loaded.
	* elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount.
	* elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which
	is about to be unloaded as a match.
	(_dl_map_object): Likewise.
	* elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about
	to be unloaded.
	* elf/circleload1.c: Don't use l_opencount anymore.
	* elf/neededtest.c: Likewise.
	* elf/neededtest2.c: Likewise.
	* elf/neededtest3.c: Likewise.
	* elf/neededtest4.c: Likewise.
	* elf/unload.c: Likewise.
	* elf/unload2.c: Likewise.
	* elf/loadtest.c: Likewise.

	* elf/rtld.c: Preloading errors are now never fatal.

2005-03-08  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* elf/Makefile: Add rules to build and run unload5 test.
	* elf/unload5.c: New file.

2005-03-08  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* elf/Makefile: Add rules to build and run unload4 test.
	* elf/unload4.c: New file.
	* elf/unload4mod1.c: New file.
	* elf/unload4mod2.c: New file.
	* elf/unload4mod3.c: New file.
	* elf/unload4mod4.c: New file.
</pre>
</div>
</content>
</entry>
<entry>
<title>(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.</title>
<updated>2004-12-22T20:10:10+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2004-12-22T20:10:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=a334319f6530564d22e775935d9c91663623a1b4'/>
<id>a334319f6530564d22e775935d9c91663623a1b4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>2.5-18.1</title>
<updated>2007-07-12T18:26:36+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2007-07-12T18:26:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=0ecb606cb6cf65de1d9fc8a919bceb4be476c602'/>
<id>0ecb606cb6cf65de1d9fc8a919bceb4be476c602</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update.</title>
<updated>2001-09-08T16:27:08+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2001-09-08T16:27:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=c4bb124a75b23d1a82cee232005dc7e8c43a4276'/>
<id>c4bb124a75b23d1a82cee232005dc7e8c43a4276</id>
<content type='text'>
2001-09-08  Ulrich Drepper  &lt;drepper@redhat.com&gt;

	* elf/dl-close.c (_dl_close): If object has no r_list (i.e., wasn't
	loaded directly) determine length if l_initfini list by iterating
	over its elements.  Minor optimizations.
	* elf/dl-deps.c (_dl_map_object_deps): Always add own map to l_initfini
	for dependency objects.
	If object was already loaded check whether any of the dependencies
	is already on the relocation dependency list.  If yes, remove the
	latter.  Minor optimizations.
	* elf/dl-lookup.c (add_dependency): Add check for self reference of
	maps here.  Search l_initfini list only if the object was loaded
	directly and not only as a dependency.
	(_dl_lookup_symbol): Add relocation dependency also if object
	is not in global scope.  Remove test for self-reference here.
	(_dl_lookup_versioned_symbol): Likewise.
	* elf/dl-object (_dl_new_object): Cleanup.  Initialize dont_free
	element of first name record.
	* elf/loadtest.c: Add some more test to recognize early if an object
	wasn't unloaded.
	* elf/Makefile: Add rules to build and run reldep5.
	* elf/reldep5.c: New file.
	* elf/reldepmod5.c: New file.
	* elf/reldepmod6.c: New file.

	* elf/reldep2.c: Fix typo.

	* elf/dl-object.c (_dl_new_object): Initialize l_scope and l_scope_max.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2001-09-08  Ulrich Drepper  &lt;drepper@redhat.com&gt;

	* elf/dl-close.c (_dl_close): If object has no r_list (i.e., wasn't
	loaded directly) determine length if l_initfini list by iterating
	over its elements.  Minor optimizations.
	* elf/dl-deps.c (_dl_map_object_deps): Always add own map to l_initfini
	for dependency objects.
	If object was already loaded check whether any of the dependencies
	is already on the relocation dependency list.  If yes, remove the
	latter.  Minor optimizations.
	* elf/dl-lookup.c (add_dependency): Add check for self reference of
	maps here.  Search l_initfini list only if the object was loaded
	directly and not only as a dependency.
	(_dl_lookup_symbol): Add relocation dependency also if object
	is not in global scope.  Remove test for self-reference here.
	(_dl_lookup_versioned_symbol): Likewise.
	* elf/dl-object (_dl_new_object): Cleanup.  Initialize dont_free
	element of first name record.
	* elf/loadtest.c: Add some more test to recognize early if an object
	wasn't unloaded.
	* elf/Makefile: Add rules to build and run reldep5.
	* elf/reldep5.c: New file.
	* elf/reldepmod5.c: New file.
	* elf/reldepmod6.c: New file.

	* elf/reldep2.c: Fix typo.

	* elf/dl-object.c (_dl_new_object): Initialize l_scope and l_scope_max.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update.</title>
<updated>2000-11-26T06:18:02+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2000-11-26T06:18:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=a850e77f3f10ce5cac3cc708274cc2a39360faa6'/>
<id>a850e77f3f10ce5cac3cc708274cc2a39360faa6</id>
<content type='text'>
	* elf/loadfail.c: Little cosmetic changes to avoid warnings.
	* elf/loadtest.c: Likewise.
	* elf/multiload.c: Likewise.
	* elf/next.c: Likewise.
	* elf/nodelete.c: Likewise.
	* elf/noload.c: Likewise.
	* elf/order.c: Likewise.
	* elf/origtest.c: Likewise.
	* elf/preloadtest.c: Likewise.
	* elf/restest1.c: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* elf/loadfail.c: Little cosmetic changes to avoid warnings.
	* elf/loadtest.c: Likewise.
	* elf/multiload.c: Likewise.
	* elf/next.c: Likewise.
	* elf/nodelete.c: Likewise.
	* elf/noload.c: Likewise.
	* elf/order.c: Likewise.
	* elf/origtest.c: Likewise.
	* elf/preloadtest.c: Likewise.
	* elf/restest1.c: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update.</title>
<updated>2000-10-25T04:00:08+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2000-10-25T04:00:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=e30f2b9828ddff95b687b9818787ab2a99570f11'/>
<id>e30f2b9828ddff95b687b9818787ab2a99570f11</id>
<content type='text'>
	* elf/dl-lookup.c (add_dependency): Fix test to check whether
	dependency already exists.
	* elf/Makefile: Add testobj1 and testobj2 as dependencies of testobj6.
	* elf/loadtest.c (main): Add test at the end that everything is
	unloaded.

	* elf/dl-open.c (dl_open_worker): Fix typo in comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* elf/dl-lookup.c (add_dependency): Fix test to check whether
	dependency already exists.
	* elf/Makefile: Add testobj1 and testobj2 as dependencies of testobj6.
	* elf/loadtest.c (main): Add test at the end that everything is
	unloaded.

	* elf/dl-open.c (dl_open_worker): Fix typo in comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update.</title>
<updated>2000-10-24T07:36:55+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2000-10-24T07:36:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=42c4f32a44c76d1f4e2b744bf80f495dc36caa87'/>
<id>42c4f32a44c76d1f4e2b744bf80f495dc36caa87</id>
<content type='text'>
2000-10-24  Ulrich Drepper  &lt;drepper@redhat.com&gt;

	Complete revamp of the reference counter handling.
	* include/link.h (struct link_map): Add l_idx field.
	* elf/dl-close.c: Handle decrementing of reference counters more
	correctly. If necessary decrement reference counters of dependencies
	of dependencies.
	* elf/dl-lookup.c (add_dependency): Only increment reference counter
	of the object itself and not also its dependencies.
	* elf/dl-open.c: Increment reference counters here.
	* elf/dl-deps.c: Remove reference counter handling here.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Adjust for _dl_map_deps not handling reference counters.

	* elf/loadtest.c: Print loaded objects at the beginning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2000-10-24  Ulrich Drepper  &lt;drepper@redhat.com&gt;

	Complete revamp of the reference counter handling.
	* include/link.h (struct link_map): Add l_idx field.
	* elf/dl-close.c: Handle decrementing of reference counters more
	correctly. If necessary decrement reference counters of dependencies
	of dependencies.
	* elf/dl-lookup.c (add_dependency): Only increment reference counter
	of the object itself and not also its dependencies.
	* elf/dl-open.c: Increment reference counters here.
	* elf/dl-deps.c: Remove reference counter handling here.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Adjust for _dl_map_deps not handling reference counters.

	* elf/loadtest.c: Print loaded objects at the beginning.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update.</title>
<updated>2000-10-21T06:02:49+00:00</updated>
<author>
<name>Ulrich Drepper</name>
<email>drepper@redhat.com</email>
</author>
<published>2000-10-21T06:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glibc.git/commit/?id=8699e7b1daa5d250b8bc69e1ecffae80170277e5'/>
<id>8699e7b1daa5d250b8bc69e1ecffae80170277e5</id>
<content type='text'>
	* elf/dl-close.c: Decrement opencount for all dependencies which can
	be removed even if the object is not yet unloaded.
	* elf/dl-deps.c (_dl_map_object_deps): If dependency is already in
	the list decrement opencount of all dependencies.
	* elf/dl-load.c (_dl_map_object_from_fd): Increment object of object
	and all dependencies.
	(_dl_map_object): Likewise.
	* elf/dl-lookup.c (add_dependency): Likewise.

	* elf/loadtest.c: Add debug when with more output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	* elf/dl-close.c: Decrement opencount for all dependencies which can
	be removed even if the object is not yet unloaded.
	* elf/dl-deps.c (_dl_map_object_deps): If dependency is already in
	the list decrement opencount of all dependencies.
	* elf/dl-load.c (_dl_map_object_from_fd): Increment object of object
	and all dependencies.
	(_dl_map_object): Likewise.
	* elf/dl-lookup.c (add_dependency): Likewise.

	* elf/loadtest.c: Add debug when with more output.
</pre>
</div>
</content>
</entry>
</feed>
