summaryrefslogtreecommitdiff
path: root/mld/link.h
diff options
context:
space:
mode:
Diffstat (limited to 'mld/link.h')
-rw-r--r--mld/link.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/mld/link.h b/mld/link.h
index 22e8c6b..9096975 100644
--- a/mld/link.h
+++ b/mld/link.h
@@ -26,6 +26,11 @@
#define ADDR_CHK(lnk_f, seg_f, max) \
((lnk_f) > max - (seg_f) || (lnk_f) + (seg_f) > max)
+// checks if a phdr and shdr are matches
+#define PHDR_SHDR_MATCH(phdr, shdr) ( \
+ ((phdr)->p_offset == (shdr)->sh_offset) && \
+ ((phdr)->p_filesz == (shdr)->sh_size)) \
+
// start addresses for each tyoe of segment
#define TEXT_VADDR_MIN 0x00400000
#define DATA_VADDR_MIN 0x10000000
@@ -119,6 +124,8 @@ struct segment {
// object im related to
struct object *obj;
+ // segment table entry im related to
+ struct segment_table_entry *ent;
// relocation table
struct relocation_table reltab;
@@ -252,6 +259,7 @@ struct linker_arguments {
char **in_files;
int in_count;
char *out_file;
+ bool freestanding;
};
/* link object files */