Fix a whole pile of issues related to the failed attempt to increase

the number of types of relocation possible in the object file. (Now,
hopefully, working.)

Also change the object serialiser/deserialiser to never try to read or
write raw structures; it's way safer this way and we don't need the
performance boost any more.

--HG--
branch : default-branch
This commit is contained in:
David Given
2016-03-18 21:46:55 +01:00
parent fd7e9f9046
commit ef8e6e25e0
9 changed files with 27 additions and 123 deletions

15
h/out.h
View File

@@ -43,7 +43,6 @@ struct outrelo {
uint16_t or_type; /* type of reference */
uint16_t or_sect; /* referencing section */
uint16_t or_nami; /* referenced symbol index */
uint16_t _padding; /* padding for alignment */
uint32_t or_addr; /* referencing address */
};
@@ -102,18 +101,6 @@ struct outname {
reserved for debuggers
*/
/*
* structure format strings
*/
#if 0
/* The following strings only make sense on 32-bit platforms, so we're going
* to try and deprecate them. */
#define SF_HEAD "22222244"
#define SF_SECT "44444"
#define SF_RELO "1124"
#define SF_NAME "4224"
#endif
/*
* structure sizes on disk (bytes in file; add digits in SF_*)
* Note! These are NOT the sizes in memory (64-bit architectures will have
@@ -121,7 +108,7 @@ struct outname {
*/
#define SZ_HEAD 20
#define SZ_SECT 20
#define SZ_RELO 8
#define SZ_RELO 10
#define SZ_NAME 12
/*