/* GNU PIC coff linker functions
Copyright 2001-2005 Craig Franklin
Copyright 2016 Molnár Károly
*/
#pragma once
/*
SECT_ACCESSBANK - used for access registers in internal ram for 18CXX
SECT_CODEPAGE - used for program code, initialized data values, and constants
SECT_DATABANK - used for banked registers in internal ram
SECT_SHAREBANK - used for unbanked registers in internal ram
SECT_LINEARMEM - used for linear RAM access
*/
enum section_type {
SECT_NONE = 0,
SECT_ACCESSBANK,
SECT_CODEPAGE,
SECT_DATABANK,
SECT_SHAREBANK,
SECT_LINEARMEM
};
/* Section definitions from the linker script are stored in the following
structure. These structures are placed in a symbol table. */
typedef struct linker_section {
enum section_type type;
int start;
int end;
int fill;
bool use_fill;
bool s_protected;
int shadow_val;
const char *shadow_sym;
} linker_section_t;
FUNC(void) gp_cofflink_add_symbol(symbol_table_t *Table, gp_symbol_t *Symbol, gp_object_t *File);
FUNC(void) gp_cofflink_remove_symbol(symbol_table_t *Table, const char *Name);
FUNC(bool) gp_cofflink_add_symbols(symbol_table_t *Table, symbol_table_t *Missing, gp_object_t *Object);
FUNC(void) gp_cofflink_combine_objects(gp_object_t *Object);
FUNC(void) gp_cofflink_clean_table(gp_object_t *Object, symbol_table_t *Symbols);
FUNC(void) gp_cofflink_combine_overlay(gp_object_t *Object, bool Remove_symbol);
FUNC(void) gp_cofflink_make_stack(gp_object_t *Object, unsigned Num_bytes);
FUNC(void) gp_cofflink_merge_sections(gp_object_t *Object);
FUNC(void) gp_cofflink_make_cinit(gp_object_t *Object);
FUNC(void) gp_cofflink_make_idata(gp_object_t *Object, bool Force_cinit);
FUNC(void) gp_cofflink_add_cinit_section(gp_object_t *Object);
FUNC(void) gp_cofflink_reloc_abs(gp_object_t *Object, MemBlock_t *M, unsigned Org_to_byte_shift,
uint32_t Flags);
FUNC(void) gp_cofflink_reloc_assigned(gp_object_t *Object, MemBlock_t *M, unsigned Org_to_byte_shift,
uint32_t Flags, symbol_table_t *Sections,
symbol_table_t *Logical_sections);
FUNC(void) gp_cofflink_reloc_cinit(gp_object_t *Object, MemBlock_t *M, unsigned Org_to_byte_shift,
gp_section_t *Cinit_section, const symbol_table_t *Sections);
FUNC(void) gp_cofflink_reloc_unassigned(gp_object_t *Object, MemBlock_t *M, unsigned Org_to_byte_shift,
uint32_t Flags, const symbol_table_t *Sections);
FUNC(void) gp_cofflink_update_table(gp_object_t *Object, unsigned Org_to_byte_shift);
FUNC(void) gp_cofflink_fill_pages(gp_object_t *Object, MemBlock_t *M, const symbol_table_t *Sections);
FUNC(void) gp_cofflink_patch(gp_object_t *Object, bool Mplink_compatible);
FUNC(MemBlock_t*) gp_cofflink_make_memory(gp_object_t *Object);
EXDATA bool gp_relocate_to_shared;
Detected encoding: UTF-8 | 0
|