#include <alloca.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include "basic.h"#include "string_utils.h"#include "objects.h"#include "option_names.h"#include "options.h"#include "option_seen.h"#include "opt_actions.h"#include "get_options.h"#include "errors.h"#include "lang_defs.h"#include "phases.h"#include "file_names.h"#include "file_utils.h"#include "pathscale_defs.h"#include "run.h"#include <elf.h>#include <fcntl.h>#include <sys/stat.h>#include <stdint.h>

Go to the source code of this file.
| void add_ar_objects | ( | char * | arg | ) |
| void add_library | ( | string_list_t * | list, | |
| const char * | lib | |||
| ) |
Definition at line 359 of file objects.c.
References add_string(), prof_lib::always, concat_strings(), prof_lib::name, option_was_seen(), prof_lib_exists(), and strcmp().
Referenced by add_final_ld_args(), add_instr_archive(), add_libgcc_s(), add_object(), and postprocess_ld_args().
| void add_library_dir | ( | char * | path | ) |
Definition at line 542 of file objects.c.
References add_string().
Referenced by add_file_args(), init_crt_paths(), init_given_crt_path(), and init_stdc_plus_plus_path().
| void add_maybe_linker_option | ( | int | flag | ) |
| void add_object | ( | int | flag, | |
| char * | arg | |||
| ) |
Definition at line 378 of file objects.c.
References add_library(), add_object(), add_string(), concat_strings(), dashdash_flag, determine_ld_phase(), internal_error(), invoked_lang, L_CC, L_f77, NULL, P_ld, P_ldplus, strcmp(), string_copy(), strncmp(), strtok(), TRUE, and xpg_flag.
Referenced by add_object(), if(), main(), and mark_used().
| void append_ar_objects_to_list | ( | string_list_t * | list | ) |
| void append_cxx_prelinker_objects_to_list | ( | string_list_t * | list | ) |
| void append_libraries_to_list | ( | string_list_t * | list | ) |
Definition at line 526 of file objects.c.
References add_string(), concat_strings(), string_list_rec::head, string_item_rec::name, string_item_rec::next, NULL, and p.
Referenced by add_file_args().
| void append_objects_to_list | ( | string_list_t * | list | ) |
Definition at line 490 of file objects.c.
References append_string_lists(), check_for_whirl(), do_exit(), error(), FALSE, filename, string_list_rec::head, invoked_lang, L_f77, string_item_rec::name, string_item_rec::next, NULL, p, TRUE, and xpg_flag.
Referenced by run_dsm_prelink(), and run_ld().
| static int check_for_whirl | ( | char * | name | ) | [static] |
Definition at line 705 of file objects.c.
References alloca, close, Elf32_Ehdr::e_ident, Elf64_Ehdr::e_type, Elf32_Ehdr::e_type, EI_CLASS, EI_MAG0, EI_MAG1, EI_MAG2, EI_MAG3, ELFCLASS32, ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, ET_SGI_IR, FALSE, fd, fstat, NULL, O_RDONLY, open, raw_bits, read, size, stat::st_size, and TRUE.
Definition at line 637 of file objects.c.
References FALSE, string_list_rec::head, string_item_rec::name, string_item_rec::next, NULL, p, prev, str, string_copy(), tail, string_list_rec::tail, and TRUE.
| char* find_crt_path | ( | char * | crtname | ) |
Definition at line 163 of file objects.c.
References buf, determine_ld_phase(), error(), FALSE, file_exists(), find_full_path_of_gcc_file(), fprintf(), get_full_phase_name(), get_phase_dir(), string_list_rec::head, string_item_rec::name, string_item_rec::next, NULL, option_was_seen(), p, P_alt_library, P_be, P_ld, P_ldplus, P_library, P_startup, sprintf(), and string_copy().
Referenced by add_file_args(), add_final_ld_args(), init_crt_paths(), and init_given_crt_path().
| void find_full_path_of_gcc_file | ( | char *const | gcc_name, | |
| char *const | comp_name, | |||
| char * | full_path, | |||
| int | full_path_len | |||
| ) |
Definition at line 92 of file objects.c.
References ABI_N32, alloca, buf, create_temp_file_name(), fclose(), fgets(), fopen, i, internal_error(), n, NULL, p, run_simple_program(), sprintf(), and strlen().
Referenced by find_crt_path(), and init_stdc_plus_plus_path().
| char* find_obj_path | ( | char * | objname | ) |
Definition at line 138 of file objects.c.
References buf, file_exists(), get_phase_dir(), P_alt_library, P_be, P_library, P_startup, sprintf(), and string_copy().
Referenced by add_file_args().
| string_list_t* get_library_dirs | ( | void | ) |
Definition at line 268 of file objects.c.
References add_library_dir(), create_temp_file_name(), drop_path(), find_crt_path(), get_full_phase_name(), i, init_given_crt_path(), internal_error(), p, P_ld, and path.
Referenced by run_ld().
| static void init_given_crt_path | ( | char * | crtname, | |
| char * | prog_name, | |||
| char * | tmp_name | |||
| ) | [static] |
Definition at line 220 of file objects.c.
References add_library_dir(), buf, debug, drop_path(), find_crt_path(), fprintf(), p, and strncpy().
Referenced by init_crt_paths(), and init_stdc_plus_plus_path().
Definition at line 239 of file objects.c.
References add_library_dir(), buf, concat_strings(), create_temp_file_name(), debug, determine_ld_phase(), drop_path(), FALSE, find_full_path_of_gcc_file(), fprintf(), get_full_phase_name(), get_phase_dir(), init_given_crt_path(), p, P_ld, and P_ldplus.
Referenced by run_ld().
| boolean is_maybe_linker_option | ( | int | flag | ) |
| boolean is_object_option | ( | int | flag | ) |
Definition at line 304 of file objects.c.
Referenced by copy_phase_options(), main(), and mark_used().
| int prof_lib_exists | ( | const char * | lib | ) |
Definition at line 348 of file objects.c.
References ABI_N32, access, asprintf(), free(), path, and R_OK.
Referenced by add_library(), and postprocess_ld_args().
string_list_t* ar_objects [static] |
string_list_t* cxx_prelinker_objects [static] |
string_list_t* library_dirs [static] |
Initial value:
{
{ "BrokenLocale", 0 },
{ "anl", 0 },
{ "c", 0 },
{ "crypt", 0 },
{ "dl", 0 },
{ "m", 0 },
{ "nsl", 0 },
{ "pthread", 0 },
{ "resolv", 0 },
{ "rpcsvc", 0 },
{ "rt", 0 },
{ "util", 0 },
{ "instr", 1 },
{ "msgi", 1 },
{ "mv", 1 },
{ "fortran", 1 },
{ NULL, 0 },
}
1.5.6