VPATH := $(SRCDIR)
CC := gcc
-CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -ansi -pedantic -std=c90
-
+CFLAGS := -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra
CSRC := aout.c coff.c elks.c hashtab.c ld.c lib.c link.c macho.c map.c mz.c omf.c pe.c report.c section.c symbol.c vector.c write7x.c
all: slink.exe
#define _LD_H
#define FAKE_LD_FILENAME "autogenerated"
+#include "stdint.h"
struct ld_state {
long nb_input_files;
const char *entry_symbol_name;
- unsigned long entry_point;
+ uint64_t entry_point;
const char *output_map_filename;
- unsigned long base_address;
+ uint64_t base_address;
const char *output_filename;
int create_shared_library, format;
}
- fprintf (fp, "Entry Point: 0x%08lx\n", state->base_address + state->entry_point);
+ fprintf (fp, "Entry Point: 0x%08"PRIx64"\n", state->base_address + state->entry_point);
if (strcmp (filename, "") != 0) {
fclose (fp);
struct object_file *of;
unsigned char *content;
- unsigned long content_size, alignment;
+ uint64_t content_size, alignment;
struct reloc_entry *reloc_arr;
unsigned long reloc_cnt;