mirror of
https://github.com/zeldaret/oot
synced 2026-05-23 15:01:47 -04:00
2c481eaeeb
* Partial linking of overlay segments, relax linker script alignment * Partial linking of all spec segments * Fix update, remove _RomPos from linker script * iQue version working pending COM-plugin update * Add plf map file resolution to sym_info.py, local symbol merging is broken * git subrepo pull tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "c4f3ba845" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "c4f3ba845" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * Make tools compatible with partial linking Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * Remove unused files * Fix some makefile bits * mkspecrules cleanup * Comment on the makerom linker layout in mkldscript * Revert linker padding strategy back to pad_text spec directives * Comment on objcopy elf -> rom step * Adjust tool descriptions * Fix compressed builds * rm reloc_prereq, no longer used * Makefile merge fix Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
65 lines
1.2 KiB
C
65 lines
1.2 KiB
C
#ifndef SPEC_H
|
|
#define SPEC_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef enum {
|
|
STMT_address,
|
|
STMT_after,
|
|
STMT_align,
|
|
STMT_beginseg,
|
|
STMT_compress,
|
|
STMT_endseg,
|
|
STMT_entry,
|
|
STMT_flags,
|
|
STMT_include,
|
|
STMT_name,
|
|
STMT_number,
|
|
STMT_romalign,
|
|
STMT_stack,
|
|
STMT_increment,
|
|
STMT_pad_text,
|
|
} STMTId;
|
|
|
|
enum {
|
|
FLAG_BOOT = (1 << 0),
|
|
FLAG_OBJECT = (1 << 1),
|
|
FLAG_RAW = (1 << 2),
|
|
FLAG_NOLOAD = (1 << 3),
|
|
FLAG_SYMS = (1 << 4),
|
|
FLAG_OVL = (1 << 5)
|
|
};
|
|
|
|
struct Include {
|
|
char* fpath;
|
|
int linkerPadding;
|
|
};
|
|
|
|
typedef struct Segment {
|
|
uint32_t fields;
|
|
char* name;
|
|
char* after;
|
|
uint32_t flags;
|
|
uint32_t address;
|
|
uint32_t stack;
|
|
uint32_t align;
|
|
uint32_t romalign;
|
|
uint32_t increment;
|
|
uint32_t entry;
|
|
uint32_t number;
|
|
struct Include* includes;
|
|
int includesCount;
|
|
bool compress;
|
|
} Segment;
|
|
|
|
void parse_rom_spec(char* spec, struct Segment** segments, int* segment_count);
|
|
|
|
bool get_single_segment_by_name(struct Segment* dstSegment, char *spec, const char *segmentName);
|
|
|
|
void free_single_segment_elements(struct Segment *segment);
|
|
|
|
void free_rom_spec(struct Segment* segments, int segment_count);
|
|
|
|
#endif
|