/contrib/toolchain/binutils/bfd/Makefile |
---|
8,6 → 8,8 |
DEFINES= -DHAVE_CONFIG_H -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec |
DEFINES+= -DHAVE_bfd_elf32_big_generic_vec -DBINDIR="/home/autobuild/tools/win32/bin" |
TDEFS= -DDEFAULT_VECTOR=i386pe_vec "-DSELECT_VECS=&i386pe_vec,&i386pei_vec,&bfd_elf32_i386_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec" |
TDEFS+= "-DSELECT_ARCHITECTURES=&bfd_i386_arch" |
SRCS = \ |
archive.c archures.c bfd.c bfdio.c \ |
19,9 → 21,9 |
elf-nacl.c elf-strtab.c elf-vxworks.c \ |
format.c hash.c ihex.c init.c libbfd.c \ |
linker.c merge.c opncls.c pe-i386.c \ |
peigen.c reloc.c section.c simple.c \ |
srec.c stabs.c stab-syms.c syms.c \ |
targets.c tekhex.c verilog.c |
peigen.c pei-i386.c reloc.c section.c \ |
simple.c srec.c stabs.c stab-syms.c \ |
syms.c targets.c tekhex.c verilog.c |
OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS))) |
32,13 → 34,18 |
libbfd.a : $(OBJS) MAkefile |
$(AR) crs libbfd.a $(OBJS) |
# mv -f libbfd.a $(SDK_DIR)/lib |
mv -f libbfd.a $(SDK_DIR)/lib |
%.o : %.c Makefile |
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< |
dwarf2.o : dwarf2.c Makefile |
$(CC) $(CFLAGS) $(DEFINES) -DDEBUGDIR=\"/home/autobuild/tools/win32/lib/debug\" $(INCLUDES) -o $@ $< |
$(CC) $(CFLAGS) $(DEFINES) -DDEBUGDIR='"/home/autobuild/tools/win32/lib/debug\"' $(INCLUDES) -o $@ $< |
targets.o : targets.c Makefile |
$(CC) $(CFLAGS) $(DEFINES) $(TDEFS) $(INCLUDES) -o $@ $< |
archures.o : archures.c Makefile |
$(CC) $(CFLAGS) $(DEFINES) $(TDEFS) $(INCLUDES) -o $@ $< |
/contrib/toolchain/binutils/bfd/bfdio.c |
---|
69,15 → 69,6 |
static FILE * |
close_on_exec (FILE *file) |
{ |
#if defined (HAVE_FILENO) && defined (F_GETFD) |
if (file) |
{ |
int fd = fileno (file); |
int old = fcntl (fd, F_GETFD, 0); |
if (old >= 0) |
fcntl (fd, F_SETFD, old | FD_CLOEXEC); |
} |
#endif |
return file; |
} |
/contrib/toolchain/binutils/bfd/cache.c |
---|
76,24 → 76,9 |
static int |
bfd_cache_max_open (void) |
{ |
if (max_open_files == 0) |
{ |
int max; |
#ifdef HAVE_GETRLIMIT |
struct rlimit rlim; |
if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 |
&& rlim.rlim_cur != RLIM_INFINITY) |
max = rlim.rlim_cur / 8; |
else |
#endif /* HAVE_GETRLIMIT */ |
#ifdef _SC_OPEN_MAX |
max = sysconf (_SC_OPEN_MAX) / 8; |
#else |
max = 10; |
#endif /* _SC_OPEN_MAX */ |
max_open_files = max < 10 ? 10 : max; |
} |
max_open_files = 16; |
return max_open_files; |
} |
/contrib/toolchain/binutils/bfd/opncls.c |
---|
673,6 → 673,7 |
which run tests with "ld [...] -o /dev/null". */ |
&& S_ISREG(buf.st_mode)) |
{ |
/* |
unsigned int mask = umask (0); |
umask (mask); |
679,6 → 680,7 |
chmod (abfd->filename, |
(0777 |
& (buf.st_mode | ((S_IXUSR | S_IXGRP | S_IXOTH) &~ mask)))); |
*/ |
} |
} |
} |
/contrib/toolchain/binutils/bfd/pei-i386.c |
---|
0,0 → 1,46 |
/* BFD back-end for Intel 386 PE IMAGE COFF files. |
Copyright 1995, 1996, 1999, 2002, 2004, 2005, 2006, 2007, 2009 |
Free Software Foundation, Inc. |
This file is part of BFD, the Binary File Descriptor library. |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
the Free Software Foundation; either version 3 of the License, or |
(at your option) any later version. |
This program is distributed in the hope that it will be useful, |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software |
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
MA 02110-1301, USA. */ |
#include "sysdep.h" |
#include "bfd.h" |
#define TARGET_SYM i386pei_vec |
#define TARGET_NAME "pei-i386" |
#define COFF_IMAGE_WITH_PE |
#define COFF_WITH_PE |
#define PCRELOFFSET TRUE |
#define TARGET_UNDERSCORE '_' |
/* Long section names not allowed in executable images, only object files. */ |
#define COFF_LONG_SECTION_NAMES 0 |
#define COFF_SUPPORT_GNU_LINKONCE |
#define COFF_LONG_FILENAMES |
#define COFF_SECTION_ALIGNMENT_ENTRIES \ |
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \ |
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \ |
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \ |
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \ |
{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \ |
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \ |
{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ |
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } |
#include "coff-i386.c" |
/contrib/toolchain/binutils/bfd/sysdep.h |
---|
27,6 → 27,8 |
#error sysdep.h must be included in lieu of config.h |
#endif |
#include <stdarg.h> |
#include "config.h" |
#include "ansidecl.h" |