I had occasion to try running eu-ld and it crashed with any --rpath-link switch. It looks like the rest of the code is not expecting the change that gen_rxxpath_data makes (normalize_dirlist crashes, but AFAICT open_along_path2 is not expecting it either and would crash if that were changed). Also by eyeball I noticed some wrong-looking free calls while grokking the surrounding code, though I didn't test them empirically.
Maybe you want to fix these up with appropriate comment changes et al.
Thanks, Roland
diff --git a/src/ld.c b/src/ld.c index 989bfab..0000000 100644 --- a/src/ld.c +++ b/src/ld.c @@ -1354,22 +1354,22 @@ gen_rxxpath_data (void) used (or ever be invented for that matter). */ if (ld_state.rpath != NULL) { - struct pathelement *endp = ld_state.rpath; + //struct pathelement *endp = ld_state.rpath; ld_state.rpath = ld_state.rpath->next; - endp->next = NULL; + //endp->next = NULL; } if (ld_state.rpath_link != NULL) { - struct pathelement *endp = ld_state.rpath_link; + //struct pathelement *endp = ld_state.rpath_link; ld_state.rpath_link = ld_state.rpath_link->next; - endp->next = NULL; + //endp->next = NULL; }
if (ld_state.runpath != NULL) { - struct pathelement *endp = ld_state.runpath; + //struct pathelement *endp = ld_state.runpath; ld_state.runpath = ld_state.runpath->next; - endp->next = NULL; + //endp->next = NULL;
/* If rpath information is also available discard it. XXX Should there be a possibility to avoid this? */ @@ -1377,7 +1377,7 @@ gen_rxxpath_data (void) { struct pathelement *old = ld_state.rpath; ld_state.rpath = ld_state.rpath->next; - free (old); + free (old); /* XXX isn't it on the obstack?? */ } } if (ld_state.runpath_link != NULL) @@ -1392,7 +1392,7 @@ gen_rxxpath_data (void) { struct pathelement *old = ld_state.rpath_link; ld_state.rpath_link = ld_state.rpath_link->next; - free (old); + free (old); /* XXX isn't it on the obstack?? */ }
/* The information in the strings in the list can actually be
elfutils-devel@lists.fedorahosted.org