Beispiel #1
0
static struct link_map* getLibMap(char * libname, struct link_map *l)
{


	struct link_map* lib_map = NULL;
	struct link_map* tmp_map = NULL;

	//_dl_error_printf("Doing search for %s linkmap\n", libname);
	// Finding libhello link_map by string name
	if (strstr(l->l_name,libname) == NULL){
		// If l is not the needed lib search in the previous and next libs 

		// Analyze previous libs
		if (l->l_prev != NULL){
			//_dl_error_printf("Doing search for %s linkmap in PREVIOUS libs\n", libname);

			tmp_map = l;

			while (tmp_map->l_prev != NULL) {
				
				if (strstr(tmp_map->l_name,libname) != NULL){
					_dl_error_printf("Map for %s found: %s\n", libname, tmp_map->l_name);
					lib_map = tmp_map;
					break;
				}

				tmp_map = tmp_map->l_prev;
			}

		// Analyze next libs if they exists and we didnt found anything else
		}else if (l->l_next != NULL && lib_map == NULL){
			//_dl_error_printf("Doing search for %s linkmap in NEXT libs\n", libname);

			tmp_map = l;

			while (tmp_map->l_next != NULL) {
				
				if (strstr(tmp_map->l_name,libname) != NULL){
					_dl_error_printf("Map for %s found: %s\n", libname, tmp_map->l_name);
					lib_map = tmp_map;
					break;
				}

				tmp_map = tmp_map->l_next;
			}

		}
		

	}else {
		// l is needed lib
		_dl_error_printf("%s found. l is %s\n", libname);
		lib_map = l;
	}
	return lib_map;
}
Beispiel #2
0
void _dl_tlsdesc_return () {
  _dl_error_printf ("NaCl doesn't support gnu2 TLS dialect\n");
  _exit (EXIT_FAILURE);
}
Beispiel #3
0
void _dl_tlsdesc_resolve_abs_plus_addend () {
  _dl_error_printf ("NaCl doesn't support gnu2 TLS dialect\n");
  _exit (EXIT_FAILURE);
}