osprey/cygnus/bfd/ipa_ld.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Types

type  ld_ipa_option
type  OPTION_SYM

Defines

#define BCOPY(src, dst, len)   bcopy((const void *)(src), (void *)(dst), (int)(len))
#define FREE(ptr)   free((void *) (ptr))
#define MALLOC_ASSERT(addr)   if (addr == 0) { perror("malloc failed: "); exit(1);}
#define MALLOC(nbytes)   malloc((size_t)(nbytes))
#define REALLOC(ptr, size)   realloc((void *)(ptr), (size_t)(size))
#define UNLINK(path)   unlink((const char *)(path))
#define MKDIR(path, mode)   mkdir((const char *)(path), (mode_t)(mode))
#define RMDIR(path)   rmdir((const char *)(path))
#define OPEN(path, oflag, mode)   open((char *)(path), (int)(oflag), (int)(mode))
#define CLOSE(fid)   close((int)(fid))
#define READ(fildes, buf, nbyte)   read((int) (fildes), (void *)(buf), (size_t) (nbyte))
#define ALLOCA(size)   alloca((unsigned int)(size))
#define FCHMOD(fid, mode)   fchmod((int)(fid), (mode_t)(mode))
#define MMAP(addr, len, prot, flags, fd, off)
#define MUNMAP(addr, len)   munmap((void *)(addr), (int)(len))
#define MEMCPY(s1, s2, n)   memcpy((void *)(s1), (void *)(s2), (size_t)(n))
#define ELF_WORD   int
#define OBJ_ASSERT(EX, obj, str)   if (!(EX)) {fprintf(stderr,"%s: %s\n", obj->filename, str); exit(1);}
#define DEFAULT_TMP_LIST_SIZE   32
#define DEFAULT_TMPDIR   "./ldtmp"
#define DEFAULT_COMPILATION_FLAGS   { "cc", "-c", 0}
#define DEFAULT_COMPILATION_ARGC   2
#define WT_COMP_FLAGS   0x3
#define arch_eltdata(bfd)   ((struct areltdata *)((bfd)->arelt_data))
#define arch_hdr(_bfd)   ((struct ar_hdr *)arch_eltdata(_bfd)->arch_header)
#define FALSE   0
#define TRUE   1
#define HS_DEFAULT   0
#define HS_HIDES   1
#define HS_EXPORTS   2
#define HS_IGNORE   3
#define F_RELOCATABLE   1
#define F_NON_SHARED   2
#define F_CALL_SHARED   4
#define F_MAKE_SHARABLE   8
#define F_STATIC   (F_NON_SHARED | F_RELOCATABLE)
#define F_DYNAMIC   (~(F_STATIC))
#define F_MAIN   (F_NON_SHARED | F_CALL_SHARED)
#define F_EXEC   (~F_RELOCATABLE)
#define F_ALL   (F_STATIC | F_DYNAMIC)
#define F_CALL_SHARED_RELOC   (F_RELOCATABLE | F_CALL_SHARED)
#define WHIRL_ST_IDX_UNINITIALIZED   (0)
#define WHIRL_ST_IDX_NOT_AVAILABLE   (-1)

Typedefs

typedef voidpointer
typedef char * string
typedef struct ld_ipa_option LD_IPA_OPTION

Enumerations

enum  AUX_ST_FLAG {
  USED_IN_OBJ = 0x00000001, USED_IN_DSO = 0x00000002, DEF_IN_OBJ = 0x00000004, DEF_IN_DSO = 0x00000008,
  OBJ_COMMON = 0x00000010, ADDR_TAKEN_IN_OBJ = 0x00000020, OBJ_ATTR_MASK = 0x0000003f, COMMON_USED_IN_IO = 0x00000040,
  IGNORE_REFCOUNTS = 0x00000080
}
enum  ld_ipa_option_enum {
  LD_IPA_SHARABLE, LD_IPA_DEMANGLE, LD_IPA_SHOW, LD_IPA_HIDES,
  LD_IPA_TARGOS, LD_IPA_VERBOSE, LD_IPA_KEEP_TEMPS, LD_IPA_ISA,
  LD_IPA_XXXX, MAX_LD_IPA, LD_IPA_SHARABLE, LD_IPA_DEMANGLE,
  LD_IPA_SHOW, LD_IPA_HIDES, LD_IPA_TARGOS, LD_IPA_VERBOSE,
  LD_IPA_KEEP_TEMPS, LD_IPA_ISA, LD_IPA_XXXX, MAX_LD_IPA
}
enum  targos_enum {
  TOS_IA64_64, TOS_IA64_32, TOS_MAX, TOS_MIPS_O32,
  TOS_MIPS_R32, TOS_MIPS_N32, TOS_MIPS_64, TOS_IA64_64,
  TOS_IA64_32, TOS_MAX
}

Functions/Subroutines

char * always_demangle (char *, char)
void read_one_section (int, void *)
void merge_ext (void *, char *, int, void *)
void msg (int, int,...)
char * ipa_copy_of (char *)
string concat_names (const string, const string)
int do_compile (string *)
void add_to_tmp_file_list (string)
void cleanup_all_files (void)
int create_tmpdir (int)
string create_unique_file (const string, char)
stringget_command_line (bfd *, string, string, int *)
int make_link (const string dest, const string src)
string ld_compile (bfd *abfd)
voidld_slookup_mext (char *, bfd_boolean)
void ld_set_st_idx (void *, int)
int ld_get_st_idx (void *)
int ipa_set_ndx (bfd *)
bfd_boolean ld_resolved_to_obj (void *, void *)
char * ld_get_section_base (void *, int)
unsigned long long ld_get_section_size (void *, int)
char * ld_get_section_name (void *, int)
voidld_get_mmap_addr (void *)
void ld_set_section_data (void *, int)
void ld_release_section_data (void *, int)
void ld_set_cur_obj (bfd *)
voidld_get_cur_obj (void)
bfd_boolean ipa_is_whirl (bfd *)
void ipa_process_whirl (bfd *)
void ipa_process_whirl_in_archive (bfd *, bfd *)
int Count_elf_external_gots (void)
void ipa_set_syms (void)

Variables

LD_IPA_OPTION ld_ipa_opt [MAX_LD_IPA]
string tos_string [TOS_MAX]
string WB_flags
string Y_flags
string toolroot
string tmpdir
string outfilename
char * __Release_ID
void *(* p_ipa_open_input )(char *, off_t *)
void(* p_ipa_init_link_line )(int, char **)
void(* p_ipa_add_link_flag )(const char *)
void(* p_ipa_modify_link_flag )(char *, char *)
void(* p_ipa_driver )(int, char **)
void(* p_process_whirl64 )(void *, off_t, void *, int, const char *, off_t)
void(* p_process_whirl32 )(void *, off_t, void *, int, const char *, off_t)
void(* p_ipa_insert_whirl_marker )(void)


Define Documentation

#define ALLOCA ( size   )     alloca((unsigned int)(size))

Definition at line 71 of file ipa_ld.h.

Referenced by get_command_line().

#define arch_eltdata ( bfd   )     ((struct areltdata *)((bfd)->arelt_data))

Definition at line 98 of file ipa_ld.h.

#define arch_hdr ( _bfd   )     ((struct ar_hdr *)arch_eltdata(_bfd)->arch_header)

Definition at line 99 of file ipa_ld.h.

#define BCOPY ( src,
dst,
len   )     bcopy((const void *)(src), (void *)(dst), (int)(len))

#define CLOSE ( fid   )     close((int)(fid))

Definition at line 65 of file ipa_ld.h.

Referenced by check_for_whirl(), create_unique_file(), and extract_archive_member().

#define DEFAULT_COMPILATION_ARGC   2

Definition at line 95 of file ipa_ld.h.

Referenced by get_command_line().

#define DEFAULT_COMPILATION_FLAGS   { "cc", "-c", 0}

Definition at line 94 of file ipa_ld.h.

Referenced by get_command_line().

#define DEFAULT_TMP_LIST_SIZE   32

Definition at line 92 of file ipa_ld.h.

Referenced by add_to_tmp_file_list().

#define DEFAULT_TMPDIR   "./ldtmp"

Definition at line 93 of file ipa_ld.h.

#define ELF_WORD   int

Definition at line 87 of file ipa_ld.h.

Referenced by get_command_line().

#define F_ALL   (F_STATIC | F_DYNAMIC)

Definition at line 192 of file ipa_ld.h.

#define F_CALL_SHARED   4

#define F_CALL_SHARED_RELOC   (F_RELOCATABLE | F_CALL_SHARED)

Definition at line 193 of file ipa_ld.h.

Referenced by get_extra_args(), and ipa_dot_so_init().

#define F_DYNAMIC   (~(F_STATIC))

Definition at line 189 of file ipa_ld.h.

#define F_EXEC   (~F_RELOCATABLE)

#define F_MAIN   (F_NON_SHARED | F_CALL_SHARED)

Definition at line 190 of file ipa_ld.h.

#define F_MAKE_SHARABLE   8

Definition at line 187 of file ipa_ld.h.

Referenced by get_extra_args(), and parse_args().

#define F_NON_SHARED   2

Definition at line 185 of file ipa_ld.h.

Referenced by get_extra_args(), and fix_static_func::operator()().

#define F_RELOCATABLE   1

Definition at line 184 of file ipa_ld.h.

Referenced by get_extra_args(), and get_extra_symtab_args().

#define F_STATIC   (F_NON_SHARED | F_RELOCATABLE)

Definition at line 188 of file ipa_ld.h.

Referenced by ipa_driver(), and Process_IPA_Options().

#define FALSE   0

Definition at line 101 of file ipa_ld.h.

#define FCHMOD ( fid,
mode   )     fchmod((int)(fid), (mode_t)(mode))

Definition at line 74 of file ipa_ld.h.

Referenced by extract_archive_member().

#define FREE ( ptr   )     free((void *) (ptr))

Definition at line 41 of file ipa_ld.h.

#define HS_DEFAULT   0

Definition at line 165 of file ipa_ld.h.

Referenced by process_whirl().

#define HS_EXPORTS   2

Definition at line 167 of file ipa_ld.h.

Referenced by process_whirl().

#define HS_HIDES   1

Definition at line 166 of file ipa_ld.h.

#define HS_IGNORE   3

Definition at line 168 of file ipa_ld.h.

Referenced by Pic_optimization().

#define MALLOC ( nbytes   )     malloc((size_t)(nbytes))

#define MALLOC_ASSERT ( addr   )     if (addr == 0) { perror("malloc failed: "); exit(1);}

#define MEMCPY ( s1,
s2,
n   )     memcpy((void *)(s1), (void *)(s2), (size_t)(n))

Definition at line 84 of file ipa_ld.h.

Referenced by extract_archive_member().

#define MKDIR ( path,
mode   )     mkdir((const char *)(path), (mode_t)(mode))

Definition at line 56 of file ipa_ld.h.

Referenced by create_tmpdir().

#define MMAP ( addr,
len,
prot,
flags,
fd,
off   ) 

Value:

mmap((void *)(addr), (int)(len), (int)(prot), (int)(flags), (int)(fd), \
   (off_t)(off))

Definition at line 77 of file ipa_ld.h.

#define MUNMAP ( addr,
len   )     munmap((void *)(addr), (int)(len))

Definition at line 81 of file ipa_ld.h.

#define OBJ_ASSERT ( EX,
obj,
str   )     if (!(EX)) {fprintf(stderr,"%s: %s\n", obj->filename, str); exit(1);}

Definition at line 89 of file ipa_ld.h.

Referenced by get_command_line().

#define OPEN ( path,
oflag,
mode   )     open((char *)(path), (int)(oflag), (int)(mode))

Definition at line 62 of file ipa_ld.h.

#define READ ( fildes,
buf,
nbyte   )     read((int) (fildes), (void *)(buf), (size_t) (nbyte))

Definition at line 68 of file ipa_ld.h.

#define REALLOC ( ptr,
size   )     realloc((void *)(ptr), (size_t)(size))

Definition at line 50 of file ipa_ld.h.

Referenced by __profile_call(), add_to_tmp_file_list(), DEFUN(), and ipa_opt().

#define RMDIR ( path   )     rmdir((const char *)(path))

Definition at line 59 of file ipa_ld.h.

Referenced by cleanup_all_files().

#define TRUE   1

Definition at line 102 of file ipa_ld.h.

#define UNLINK ( path   )     unlink((const char *)(path))

Definition at line 53 of file ipa_ld.h.

Referenced by cleanup_all_files(), and ld_compile().

#define WHIRL_ST_IDX_NOT_AVAILABLE   (-1)

Definition at line 347 of file ipa_ld.h.

Referenced by ipa_set_ndx(), ipa_symbol_sync(), Linker_mark_not_gp_rel(), and Merge_Global_St().

#define WHIRL_ST_IDX_UNINITIALIZED   (0)

Definition at line 346 of file ipa_ld.h.

Referenced by ipa_set_ndx(), ipa_symbol_sync(), Linker_mark_not_gp_rel(), and Merge_Global_St().

#define WT_COMP_FLAGS   0x3

Definition at line 96 of file ipa_ld.h.

Referenced by get_command_line(), WN_get_flags(), and WN_write_flags().


Typedef Documentation

typedef void* pointer

Definition at line 104 of file ipa_ld.h.

typedef char* string

Definition at line 105 of file ipa_ld.h.


Enumeration Type Documentation

Enumerator:
USED_IN_OBJ 
USED_IN_DSO 
DEF_IN_OBJ 
DEF_IN_DSO 
OBJ_COMMON 
ADDR_TAKEN_IN_OBJ 
OBJ_ATTR_MASK 
COMMON_USED_IN_IO 
IGNORE_REFCOUNTS 

Definition at line 109 of file ipa_ld.h.

Enumerator:
LD_IPA_SHARABLE 
LD_IPA_DEMANGLE 
LD_IPA_SHOW 
LD_IPA_HIDES 
LD_IPA_TARGOS 
LD_IPA_VERBOSE 
LD_IPA_KEEP_TEMPS 
LD_IPA_ISA 
LD_IPA_XXXX 
MAX_LD_IPA 
LD_IPA_SHARABLE 
LD_IPA_DEMANGLE 
LD_IPA_SHOW 
LD_IPA_HIDES 
LD_IPA_TARGOS 
LD_IPA_VERBOSE 
LD_IPA_KEEP_TEMPS 
LD_IPA_ISA 
LD_IPA_XXXX 
MAX_LD_IPA 

Definition at line 141 of file ipa_ld.h.

Enumerator:
TOS_IA64_64 
TOS_IA64_32 
TOS_MAX 
TOS_MIPS_O32 
TOS_MIPS_R32 
TOS_MIPS_N32 
TOS_MIPS_64 
TOS_IA64_64 
TOS_IA64_32 
TOS_MAX 

Definition at line 195 of file ipa_ld.h.


Function Documentation

void add_to_tmp_file_list ( string   ) 

Definition at line 283 of file ipa_ld.c.

char* always_demangle ( char *  ,
char   
)

Definition at line 143 of file ipa_ld.c.

void cleanup_all_files ( void   ) 

Definition at line 326 of file ipa_ld.c.

string concat_names ( const   string,
const   string 
)

int Count_elf_external_gots ( void   ) 

Definition at line 1022 of file ipa_ld.c.

int create_tmpdir ( int   ) 

Definition at line 414 of file ipa_ld.c.

string create_unique_file ( const   string,
char   
)

Definition at line 498 of file ipa_ld.c.

int do_compile ( string  ) 

Definition at line 219 of file ipa_ld.c.

string* get_command_line ( bfd ,
string  ,
string  ,
int *   
)

char* ipa_copy_of ( char *   ) 

Definition at line 160 of file ipa_ld.c.

References BCOPY, len, MALLOC, MALLOC_ASSERT, p, and strlen().

Referenced by add_Y_opt(), create_tmp_file(), do_compile(), ipa_opt(), and make_temp_file().

bfd_boolean ipa_is_whirl ( bfd  ) 

void ipa_process_whirl ( bfd  ) 

Definition at line 1088 of file ipa_ld.c.

References EF_IRIX_ABI64, elf_elfheader, FALSE, bfd::filename, p_ipa_open_input, PTR, and bfd::usrdata.

Referenced by load_symbols().

void ipa_process_whirl_in_archive ( bfd ,
bfd  
)

int ipa_set_ndx ( bfd  ) 

Definition at line 835 of file ipa_ld.c.

References ipa_is_whirl(), WHIRL_ST_IDX_NOT_AVAILABLE, and WHIRL_ST_IDX_UNINITIALIZED.

void ipa_set_syms ( void   ) 

string ld_compile ( bfd abfd  ) 

void* ld_get_cur_obj ( void   ) 

Definition at line 1045 of file ipa_ld.c.

void* ld_get_mmap_addr ( void  ) 

Definition at line 952 of file ipa_ld.c.

References abfd, and bfd::usrdata.

Referenced by process_whirl().

char* ld_get_section_base ( void ,
int   
)

Definition at line 906 of file ipa_ld.c.

References abfd, elf_elfsections, elf_internal_shdr::sh_offset, and bfd::usrdata.

Referenced by process_whirl().

char* ld_get_section_name ( void ,
int   
)

unsigned long long ld_get_section_size ( void ,
int   
)

Definition at line 921 of file ipa_ld.c.

References abfd, and elf_elfsections.

Referenced by process_whirl().

int ld_get_st_idx ( void  ) 

Definition at line 820 of file ipa_ld.c.

void ld_release_section_data ( void ,
int   
)

Definition at line 1004 of file ipa_ld.c.

References abfd, elf_internal_shdr::contents, elf_elfsections, and free().

bfd_boolean ld_resolved_to_obj ( void ,
void  
)

Definition at line 861 of file ipa_ld.c.

void ld_set_cur_obj ( bfd  ) 

Definition at line 1033 of file ipa_ld.c.

Referenced by ipa_process_whirl_in_archive(), and load_symbols().

void ld_set_section_data ( void ,
int   
)

void ld_set_st_idx ( void ,
int   
)

Definition at line 806 of file ipa_ld.c.

Referenced by Merge_Global_St(), and Merge_St_With_Pext().

void* ld_slookup_mext ( char *  ,
bfd_boolean   
)

int make_link ( const string  dest,
const string  src 
)

Definition at line 647 of file ipa_ld.c.

void merge_ext ( void ,
char *  ,
int  ,
void  
)

Definition at line 147 of file ipa_ld.c.

Referenced by process_whirl().

void msg ( int  ,
int  ,
  ... 
)

Definition at line 150 of file ipa_ld.c.

void read_one_section ( int  ,
void  
)

Definition at line 145 of file ipa_ld.c.

Referenced by get_command_line(), and process_whirl().


Variable Documentation

char* __Release_ID

Definition at line 144 of file ipa_ld.c.

void(* p_ipa_add_link_flag)(const char *)

Referenced by ipa_set_syms().

void(* p_ipa_driver)(int, char **)

Referenced by ipa_set_syms().

void(* p_ipa_init_link_line)(int, char **)

Referenced by ipa_set_syms().

Referenced by ipa_set_syms().

void(* p_ipa_modify_link_flag)(char *, char *)

Referenced by ipa_set_syms().

void*(* p_ipa_open_input)(char *, off_t *)

Referenced by ipa_process_whirl(), and ipa_set_syms().

void(* p_process_whirl32)(void *, off_t, void *, int, const char *, off_t)

Referenced by ipa_set_syms().

void(* p_process_whirl64)(void *, off_t, void *, int, const char *, off_t)

Referenced by ipa_set_syms(), and load_symbols().

string tos_string[TOS_MAX]

Definition at line 207 of file ipa_ld.h.

Referenced by add_WB_opt(), and get_extra_args().

Definition at line 208 of file ipa_ld.h.

Referenced by add_Y_opt(), and get_extra_args().


Generated on Wed Apr 8 14:50:21 2009 for Open64 by  doxygen 1.5.6