Lines Matching refs:bfd

236 static bfd * open_input_bfd ( const char *filename ) {  in open_input_bfd()
237 bfd *bfd; in open_input_bfd() local
240 bfd = bfd_openr ( filename, NULL ); in open_input_bfd()
241 if ( ! bfd ) { in open_input_bfd()
250 if ( bfd_check_format ( bfd, bfd_object ) < 0 ) { in open_input_bfd()
255 return bfd; in open_input_bfd()
263 static asymbol ** read_symtab ( bfd *bfd ) { in read_symtab() argument
269 symtab_size = bfd_get_symtab_upper_bound ( bfd ); in read_symtab()
277 symcount = bfd_canonicalize_symtab ( bfd, symtab ); in read_symtab()
295 static arelent ** read_reltab ( bfd *bfd, asymbol **symtab, in read_reltab() argument
302 reltab_size = bfd_get_reloc_upper_bound ( bfd, section ); in read_reltab()
310 numrels = bfd_canonicalize_reloc ( bfd, section, reltab, symtab ); in read_reltab()
327 static struct pe_section * process_section ( bfd *bfd, in process_section() argument
333 unsigned long flags = bfd_get_section_flags ( bfd, section ); in process_section()
358 section_memsz = bfd_section_size ( bfd, section ); in process_section()
368 new->hdr.VirtualAddress = bfd_get_section_vma ( bfd, section ); in process_section()
411 if ( ! bfd_get_section_contents ( bfd, section, new->contents, in process_section()
461 static void process_reloc ( bfd *bfd, asection *section, arelent *rel, in process_reloc() argument
465 unsigned long offset = ( bfd_get_section_vma ( bfd, section ) + in process_reloc()
663 bfd *bfd; in elf2pe() local
678 bfd = open_input_bfd ( elf_name ); in elf2pe()
679 symtab = read_symtab ( bfd ); in elf2pe()
684 bfd_get_start_address ( bfd ); in elf2pe()
690 for ( section = bfd->sections ; section ; section = section->next ) { in elf2pe()
692 if ( ! ( bfd_get_section_flags ( bfd, section ) & SEC_ALLOC ) ) in elf2pe()
695 *(next_pe_section) = process_section ( bfd, &pe_header, in elf2pe()
699 reltab = read_reltab ( bfd, symtab, section ); in elf2pe()
701 process_reloc ( bfd, section, *rel, &pe_reltab ); in elf2pe()
725 bfd_close ( bfd ); in elf2pe()