* generator at the same time.
*/
static void out(int64_t offset, int32_t segto, const void *data,
- uint32_t type, int32_t segment, int32_t wrt)
+ uint64_t type, int32_t segment, int32_t wrt)
{
static int32_t lineno = 0; /* static!!! */
static char *lnfname = NULL;
else
size = (bits == 16) ? 2 : 4;
if (opx->segment != segment) {
- int32_t reltype = (size == 2 ? OUT_REL2ADR : OUT_REL4ADR);
+ int64_t reltype = (size == 2 ? OUT_REL2ADR : OUT_REL4ADR);
data = opx->offset;
out(offset, segment, &data, reltype + insn_end - offset,
opx->segment, opx->wrt);
strcat(listdata, str);
}
-static void list_output(int32_t offset, const void *data, uint32_t type)
+static void list_output(int32_t offset, const void *data, uint64_t type)
{
- uint32_t typ, size;
+ uint64_t typ, size;
if (!listp || suppress || user_nolist) /* fbk - 9/2/00 */
return;
list_out(offset, q);
} else if (typ == OUT_RESERVE) {
char q[20];
- snprintf(q, sizeof(q), "<res %08"PRIX32">", size);
+ snprintf(q, sizeof(q), "<res %08"PRIX64">", size);
list_out(offset, q);
}
}
* work with when doing things like uplevel(LIST_TIMES) or
* uplevel(LIST_INCBIN).
*/
- void (*output) (int32_t, const void *, uint32_t);
+ void (*output) (int32_t, const void *, uint64_t);
/*
* Called to send a text line to the listing generator. The
* The `type' argument specifies the type of output data, and
* usually the size as well: its contents are described below.
*/
- void (*output) (int32_t segto, const void *data, uint32_t type,
+ void (*output) (int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt);
/*
* OUT_RAWDATA, in which case it points to an "uint8_t"
* array.
*/
-#define OUT_RAWDATA 0x00000000UL
-#define OUT_ADDRESS 0x10000000UL
-#define OUT_REL2ADR 0x20000000UL
-#define OUT_REL4ADR 0x30000000UL
-#define OUT_RESERVE 0x40000000UL
-#define OUT_TYPMASK 0xF0000000UL
-#define OUT_SIZMASK 0x0FFFFFFFUL
+#define OUT_RAWDATA (uint64_t)0x0000000000000000
+#define OUT_ADDRESS (uint64_t)0x1000000000000000
+#define OUT_REL2ADR (uint64_t)0x2000000000000000
+#define OUT_REL4ADR (uint64_t)0x3000000000000000
+#define OUT_RESERVE (uint64_t)0x4000000000000000
+#define OUT_REL8ADR (uint64_t)0x5000000000000000
+#define OUT_TYPMASK (uint64_t)0xF000000000000000
+#define OUT_SIZMASK (uint64_t)0x0FFFFFFFFFFFFFFF
/*
* ------------------------------------------------------------
return offset - asym->value;
}
-static void aout_out(int32_t segto, const void *data, uint32_t type,
+static void aout_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
struct Section *s;
p->number = raa_read(bsym, segment), p->type = 2;
}
-static void as86_out(int32_t segto, const void *data, uint32_t type,
+static void as86_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
struct Section *s;
- int32_t realbytes = type & OUT_SIZMASK;
+ int64_t realbytes = type & OUT_SIZMASK;
int32_t offset;
uint8_t mydata[4], *p;
}
}
-static void bin_out(int32_t segto, const void *data, uint32_t type,
+static void bin_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
uint8_t *p, mydata[8];
struct Section *s;
- int32_t realbytes;
+ int64_t realbytes;
if (wrt != NO_SEG) {
return 0;
}
-static void coff_out(int32_t segto, const void *data, uint32_t type,
+static void coff_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
struct Section *s;
return offset - sym->value;
}
-static void elf_out(int32_t segto, const void *data, uint32_t type,
+static void elf_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
struct Section *s;
return offset - sym->value;
}
-static void elf_out(int32_t segto, const void *data, uint32_t type,
+static void elf_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
struct Section *s;
stype = STT_OBJECT;
break;
case TY_OWORD:
- ssize = 8;
+ ssize = 16;
stype = STT_OBJECT;
break;
case TY_COMMON:
static void ieee_data_new(struct ieeeSection *);
static void ieee_write_fixup(int32_t, int32_t, struct ieeeSection *,
- int, uint32_t, int32_t);
+ int, uint64_t, int32_t);
static void ieee_install_fixup(struct ieeeSection *, struct ieeeFixupp *);
static int32_t ieee_segment(char *, int, int *);
static void ieee_write_file(int debuginfo);
/*
* Put data out
*/
-static void ieee_out(int32_t segto, const void *data, uint32_t type,
+static void ieee_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
- uint32_t size, realtype;
+ uint64_t size, realtype;
const uint8_t *ucdata;
int32_t ldata;
struct ieeeSection *seg;
*/
static void ieee_write_fixup(int32_t segment, int32_t wrt,
struct ieeeSection *segto, int size,
- uint32_t realtype, int32_t offset)
+ uint64_t realtype, int32_t offset)
{
struct ieeeSection *target;
struct ieeeFixupp s;
++sect->nreloc;
}
-static void macho_output(int32_t secto, const void *data, uint32_t type,
+static void macho_output(int32_t secto, const void *data, uint64_t type,
int32_t section, int32_t wrt)
{
struct section *s, *sbss;
int segrel, int32_t seg, int32_t wrt,
struct Segment *segto);
-static void obj_out(int32_t segto, const void *data, uint32_t type,
+static void obj_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
- uint32_t size, realtype;
+ uint64_t size, realtype;
const uint8_t *ucdata;
int32_t ldata;
struct Segment *seg;
return segments[i].seglength;
}
-static void rdf2_out(int32_t segto, const void *data, uint32_t type,
+static void rdf2_out(int32_t segto, const void *data, uint64_t type,
int32_t segment, int32_t wrt)
{
- int32_t bytes = type & OUT_SIZMASK;
+ int64_t bytes = type & OUT_SIZMASK;
struct RelocRec rr;
uint8_t databuf[8], *pd;
int seg;