• Home
  • Raw
  • Download

Lines Matching refs:ld_state

219 struct ld_state ld_state;  variable
321 obstack_init (&ld_state.smem); in main()
343 if (unlikely (ld_state.hash_style == hash_style_none)) in main()
344 ld_state.hash_style = hash_style_sysv; in main()
361 ld_state.srcfiles = NULL; in main()
374 ld_state.default_paths = ld_state.paths; in main()
375 ld_state.paths = ld_state.tailpaths = NULL; in main()
388 error_loading |= FILE_PROCESS (-1, last_file, &ld_state, &last_file); in main()
404 if (ld_state.file_type != relocatable_file_type) in main()
422 if (FLAG_UNRESOLVED (&ld_state) != 0) in main()
429 if (ld_state.file_type != relocatable_file_type) in main()
435 while ((h = ld_section_tab_iterate (&ld_state.section_tab, &p)) != NULL) in main()
444 COUNT_RELOCATIONS (&ld_state, runp); in main()
446 ld_state.relsize_total += runp->relsize; in main()
454 if (ld_state.need_got) in main()
455 create_special_section_symbol (&ld_state.got_symbol, in main()
460 create_special_section_symbol (&ld_state.dyn_symbol, "_DYNAMIC"); in main()
465 if (OPEN_OUTFILE (&ld_state, EM_NONE, ELFCLASSNONE, ELFDATANONE) != 0) in main()
472 GENERATE_SECTIONS (&ld_state); in main()
484 CREATE_SECTIONS (&ld_state); in main()
488 if (CREATE_OUTFILE (&ld_state) != 0) in main()
492 err |= FINALIZE (&ld_state); in main()
566 ld_state.export_all_dynamic = true; in parse_opt_1st()
570 if (ld_state.file_type != no_file_type) in parse_opt_1st()
573 ld_state.file_type = dso_file_type; in parse_opt_1st()
576 ld_state.export_all_dynamic = true; in parse_opt_1st()
580 ld_state.soname = arg; in parse_opt_1st()
589 ld_state.interp = arg; in parse_opt_1st()
600 ld_state.add_ld_comment = true; in parse_opt_1st()
602 ld_state.add_ld_comment = true; in parse_opt_1st()
608 if (ld_state.file_type != no_file_type) in parse_opt_1st()
611 ld_state.file_type = relocatable_file_type; in parse_opt_1st()
615 ld_state.strip = strip_debug; in parse_opt_1st()
619 ld_state.trace_files = true; in parse_opt_1st()
636 ld_state.pagesize = strtoul (arg, &endp, 0); in parse_opt_1st()
640 ld_state.pagesize *= 1024; in parse_opt_1st()
642 ld_state.pagesize *= 1024 * 1024; in parse_opt_1st()
648 ld_state.pagesize = 0; in parse_opt_1st()
655 add_rxxpath (&ld_state.rpath, arg); in parse_opt_1st()
659 add_rxxpath (&ld_state.rpath_link, arg); in parse_opt_1st()
663 add_rxxpath (&ld_state.runpath, arg); in parse_opt_1st()
667 add_rxxpath (&ld_state.runpath_link, arg); in parse_opt_1st()
672 ld_state.gc_sections = key == ARGP_gc_sections; in parse_opt_1st()
676 ld_state.eh_frame_hdr = true; in parse_opt_1st()
681 ld_state.hash_style = hash_style_gnu; in parse_opt_1st()
683 ld_state.hash_style = hash_style_gnu | hash_style_sysv; in parse_opt_1st()
685 ld_state.hash_style = hash_style_sysv; in parse_opt_1st()
692 ld_state.build_id = "sha1"; in parse_opt_1st()
699 ld_state.build_id = arg; in parse_opt_1st()
705 if (ld_state.strip == strip_all) in parse_opt_1st()
706 ld_state.strip = strip_everything; in parse_opt_1st()
708 ld_state.strip = strip_all; in parse_opt_1st()
750 ld_state.nodefs = false; in parse_opt_1st()
779 ld_state.entry = arg; in parse_opt_2nd()
783 if (ld_state.outfname != NULL) in parse_opt_2nd()
790 ld_state.outfname = arg; in parse_opt_2nd()
795 ld_state.optlevel = 1; in parse_opt_2nd()
805 ld_state.optlevel = level; in parse_opt_2nd()
810 ld_state.extract_rule = allextract; in parse_opt_2nd()
813 ld_state.extract_rule = defaultextract; in parse_opt_2nd()
817 ld_state.as_needed = true; in parse_opt_2nd()
820 ld_state.as_needed = false; in parse_opt_2nd()
826 ld_state.statically = key == ARGP_static; in parse_opt_2nd()
885 error_loading |= FILE_PROCESS (-1, last_file, &ld_state, &last_file); in parse_opt_2nd()
931 if (ld_state.needed == NULL) in load_needed()
934 runp = first = ld_state.needed->next; in load_needed()
941 err = FILE_PROCESS (-1, runp, &ld_state, &ignore); in load_needed()
974 && ld_state.file_type == dso_file_type) in parse_z_option()
975 ld_state.dt_flags_1 |= DF_1_NODEFLIB; in parse_z_option()
977 ld_state.muldefs = true; in parse_z_option()
979 ld_state.nodefs = true; in parse_z_option()
981 ld_state.nodefs = false; in parse_z_option()
985 ld_state.dt_flags |= DF_BIND_NOW; in parse_z_option()
989 ld_state.dt_flags |= DF_ORIGIN; in parse_z_option()
992 && ld_state.file_type == dso_file_type) in parse_z_option()
993 ld_state.dt_flags_1 |= DF_1_NODELETE; in parse_z_option()
995 ld_state.dt_flags_1 |= DF_1_INITFIRST; in parse_z_option()
998 && ld_state.file_type == dso_file_type) in parse_z_option()
999 ld_state.dt_flags_1 |= DF_1_NOOPEN; in parse_z_option()
1001 ld_state.is_system_library = true; in parse_z_option()
1003 ld_state.execstack = execstack_true; in parse_z_option()
1005 ld_state.execstack = execstack_false_force; in parse_z_option()
1021 ld_state.extract_rule = allextract; in parse_z_option_2()
1023 ld_state.extract_rule = defaultextract; in parse_z_option_2()
1025 ld_state.extract_rule = weakextract; in parse_z_option_2()
1027 ld_state.lazyload = true; in parse_z_option_2()
1029 ld_state.lazyload = false; in parse_z_option_2()
1031 ld_state.as_needed = true; in parse_z_option_2()
1033 ld_state.as_needed = false; in parse_z_option_2()
1042 ld_state.default_bind_local = true; in parse_B_option()
1056 ld_state.statically = true; in parse_B_option_2()
1058 ld_state.statically = false; in parse_B_option_2()
1061 && ld_state.file_type == dso_file_type) in parse_B_option_2()
1062 ld_state.dt_flags |= DF_SYMBOLIC; in parse_B_option_2()
1081 ld_state.ebl = ebl_openbackend_emulation (emulation); in determine_output_format()
1083 assert (ld_state.ebl != NULL); in determine_output_format()
1111 ld_state.ebl = in determine_output_format()
1148 if (ld_state.ebl == NULL) in determine_output_format()
1168 if (ld_state.file_type == no_file_type) in determine_output_format()
1169 ld_state.file_type = executable_file_type; in determine_output_format()
1180 obstack_calloc (&ld_state.smem, sizeof (struct pathelement)); in ld_new_searchdir()
1185 if (ld_state.tailpaths == NULL) in ld_new_searchdir()
1186 ld_state.paths = ld_state.tailpaths = newpath->next = newpath; in ld_new_searchdir()
1189 ld_state.tailpaths->next = newpath; in ld_new_searchdir()
1190 ld_state.tailpaths = newpath; in ld_new_searchdir()
1191 newpath->next = ld_state.paths; in ld_new_searchdir()
1200 obstack_calloc (&ld_state.smem, sizeof (struct usedfiles)); in ld_new_inputfile()
1204 newfile->extract_rule = ld_state.extract_rule; in ld_new_inputfile()
1205 newfile->as_needed = ld_state.as_needed; in ld_new_inputfile()
1206 newfile->lazyload = ld_state.lazyload; in ld_new_inputfile()
1225 ld_state.nallsections = ld_state.section_tab.filled; in collect_sections()
1229 ld_state.allsections = in collect_sections()
1230 (struct scnhead **) obstack_alloc (&ld_state.smem, in collect_sections()
1231 (ld_state.nallsections + 1) in collect_sections()
1238 while ((h = ld_section_tab_iterate (&ld_state.section_tab, &p)) != NULL) in collect_sections()
1269 ld_state.allsections[cnt++] = h; in collect_sections()
1271 ld_state.nusedsections = cnt; in collect_sections()
1273 assert (cnt == ld_state.nallsections); in collect_sections()
1286 newp = (struct pathelement *) obstack_alloc (&ld_state.smem, sizeof (*newp)); in add_rxxpath()
1319 lastp->pname = obstack_strndup (&ld_state.smem, pname, in normalize_dirlist()
1326 newp = (struct pathelement *) obstack_alloc (&ld_state.smem, in normalize_dirlist()
1355 if (ld_state.rpath != NULL) in gen_rxxpath_data()
1357 struct pathelement *endp = ld_state.rpath; in gen_rxxpath_data()
1358 ld_state.rpath = ld_state.rpath->next; in gen_rxxpath_data()
1361 if (ld_state.rpath_link != NULL) in gen_rxxpath_data()
1363 struct pathelement *endp = ld_state.rpath_link; in gen_rxxpath_data()
1364 ld_state.rpath_link = ld_state.rpath_link->next; in gen_rxxpath_data()
1368 if (ld_state.runpath != NULL) in gen_rxxpath_data()
1370 struct pathelement *endp = ld_state.runpath; in gen_rxxpath_data()
1371 ld_state.runpath = ld_state.runpath->next; in gen_rxxpath_data()
1376 while (ld_state.rpath != NULL) in gen_rxxpath_data()
1378 struct pathelement *old = ld_state.rpath; in gen_rxxpath_data()
1379 ld_state.rpath = ld_state.rpath->next; in gen_rxxpath_data()
1383 if (ld_state.runpath_link != NULL) in gen_rxxpath_data()
1385 struct pathelement *endp = ld_state.runpath_link; in gen_rxxpath_data()
1386 ld_state.runpath_link = ld_state.runpath_link->next; in gen_rxxpath_data()
1391 while (ld_state.rpath_link != NULL) in gen_rxxpath_data()
1393 struct pathelement *old = ld_state.rpath_link; in gen_rxxpath_data()
1394 ld_state.rpath_link = ld_state.rpath_link->next; in gen_rxxpath_data()
1402 normalize_dirlist (&ld_state.runpath_link); in gen_rxxpath_data()
1404 else if (ld_state.rpath_link != NULL) in gen_rxxpath_data()
1406 normalize_dirlist (&ld_state.rpath_link); in gen_rxxpath_data()
1429 add_rxxpath (&ld_state.ld_library_path1, ld_library_path1); in gen_rxxpath_data()
1430 normalize_dirlist (&ld_state.ld_library_path1); in gen_rxxpath_data()
1433 add_rxxpath (&ld_state.ld_library_path2, ld_library_path2); in gen_rxxpath_data()
1434 normalize_dirlist (&ld_state.ld_library_path2); in gen_rxxpath_data()
1470 if (ld_state.output_segments == NULL) in create_lscript_symbols()
1473 struct output_segment *segment = ld_state.output_segments->next; in create_lscript_symbols()
1484 struct symbol *s = ld_state.unresolved; in create_lscript_symbols()
1503 CDBL_LIST_DEL (ld_state.unresolved, s); in create_lscript_symbols()
1504 --ld_state.nunresolved; in create_lscript_symbols()
1528 obstack_calloc (&ld_state.smem, sizeof (struct symbol)); in create_lscript_symbols()
1535 if (unlikely (ld_symbol_tab_insert (&ld_state.symbol_tab, in create_lscript_symbols()
1542 struct symbol *old = ld_symbol_tab_find (&ld_state.symbol_tab, in create_lscript_symbols()
1570 SNGL_LIST_PUSH (ld_state.lscript_syms, s); in create_lscript_symbols()
1571 ++ld_state.nlscript_syms; in create_lscript_symbols()
1579 while (segment != ld_state.output_segments->next); in create_lscript_symbols()
1593 obstack_calloc (&ld_state.smem, sizeof (*newsym)); in create_special_section_symbol()
1600 if (unlikely (ld_symbol_tab_insert (&ld_state.symbol_tab, in create_special_section_symbol()
1615 ++ld_state.nsymtab; in create_special_section_symbol()