mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
b26059aa44
* changes to support i386-sysv with shared libraries: * coffcode.h (sec_to_styp_flags): if TWO_DATA_SECS is defined, check for .data2; if _LIB is defined, check for it; map SEC_NEVER_LOAD to STYP_NOLOAD. (styp_to_sec_flags): map STYP_NOLOAD to SEC_NEVER_LOAD. (make_a_section_from_file): if TWO_DATA_SECS, accept .data2. (coff_write_object_contents): force vaddr of .lib to 0; set scnptr if section has contents, not just if it is loadable; if TWO_DATA_SECS, check for .data2 (coff_set_section_contents): set vma of .lib section to number of .lib sections. * coff-i386.c: define TWO_DATA_SECS; use a special CALC_ADDEND; don't define coff_write_armap to bsd_write_armap. * hosts/i386v.h: don't include <utime.h>, since it is not provided by SVR3.2.
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
#include <fcntl.h>
|
|
#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <ctype.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
#ifndef O_ACCMODE
|
|
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
|
#endif
|
|
#ifndef SEEK_SET
|
|
#define SEEK_SET 0
|
|
#define SEEK_CUR 1
|
|
#endif
|
|
|
|
#define POSIX_UTIME
|
|
|
|
/* Some things that need to be defined in order to make code written for
|
|
BSD Unix compile under System V Unix. */
|
|
|
|
/*#include <memory.h>*/
|
|
#define bcmp(b1,b2,len) memcmp(b1,b2,len)
|
|
#define bcopy(src,dst,len) memcpy(dst,src,len)
|
|
#define bzero(s,n) memset(s,0,n)
|
|
|
|
#include <string.h>
|
|
#define index(s,c) strchr(s,c)
|
|
#define rindex(s,c) strrchr(s,c)
|
|
|
|
#ifndef DONTDECLARE_MALLOC
|
|
extern PTR EXFUN(malloc,(unsigned));
|
|
extern PTR EXFUN(realloc, (PTR, unsigned));
|
|
extern void EXFUN(free,(PTR));
|
|
#endif
|
|
|
|
/* EXACT TYPES */
|
|
typedef char int8e_type;
|
|
typedef unsigned char uint8e_type;
|
|
typedef short int16e_type;
|
|
typedef unsigned short uint16e_type;
|
|
typedef int int32e_type;
|
|
typedef unsigned int uint32e_type;
|
|
|
|
/* CORRECT SIZE OR GREATER */
|
|
typedef char int8_type;
|
|
typedef unsigned char uint8_type;
|
|
typedef short int16_type;
|
|
typedef unsigned short uint16_type;
|
|
typedef int int32_type;
|
|
typedef unsigned int uint32_type;
|
|
|
|
#include "fopen-same.h"
|