diff options
author | Tristan Gingold <gingold@adacore.com> | 2010-04-30 09:40:42 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2010-04-30 09:40:42 +0000 |
commit | 8e57e1d134f0cca20ca7b1dec0196090a32d5749 (patch) | |
tree | 65d9c6021a7bea982573c1a7d8c9f740976d5f7f /include | |
parent | c24d02423253f4514561d5639d2a0865886f0990 (diff) | |
download | gdb-8e57e1d134f0cca20ca7b1dec0196090a32d5749.zip gdb-8e57e1d134f0cca20ca7b1dec0196090a32d5749.tar.gz gdb-8e57e1d134f0cca20ca7b1dec0196090a32d5749.tar.bz2 |
bfd/
2010-04-30 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
and syms removed.
(struct carsym_mem): New structure.
(vms_add_index): New function.
(vms_add_indexes_from_list): New function.
(vms_traverse_index): Parameter carsym changed to carsym_mem.
Code adjusted to handle elfidx.
(vms_lib_read_index): Adjusted for vms_traverse_index changes.
Parameter NBREL is now a pointer.
(_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
archives.
(_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
(_bfd_vms_lib_find_symbol): Ditto.
(vms_lib_bopen): Fix two typos: return FALSE in case of error,
check MHD id.
* vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
changes of _bfd_vms_lib_find_symbol.
include/vms
2010-04-30 Tristan Gingold <gingold@adacore.com>
* lbr.h (LBR__C_TYP_ISHSTB): Added.
(LHD_SANEID4): Renamed to ...
(LHD_SANEID6): ... this.
(LBR_MAJORID, LBR_ELFMAJORID): New macros.
(struct vms_rfa): New structure.
(struct vms_idxdef): Renamed to ...
(struct vms_idx): ... this.
(struct vms_idxdef2): Renamed to ...
(struct vms_elfidx): ... this.
(ELFIDX__WEAK, ELFIDX__GROUP, ELFIDX__LISTRFA, ELFIDX__SYMESC): New
macros.
(struct vms_lhs, struct vms_lns): New structures.
(struct vms_mhd): Add missing fields.
(MHD__C_MHDLEN): New macro.
Diffstat (limited to 'include')
-rw-r--r-- | include/vms/ChangeLog | 17 | ||||
-rw-r--r-- | include/vms/lbr.h | 79 |
2 files changed, 86 insertions, 10 deletions
diff --git a/include/vms/ChangeLog b/include/vms/ChangeLog index e6945f3..b7114d3 100644 --- a/include/vms/ChangeLog +++ b/include/vms/ChangeLog @@ -1,3 +1,20 @@ +2010-04-30 Tristan Gingold <gingold@adacore.com> + + * lbr.h (LBR__C_TYP_ISHSTB): Added. + (LHD_SANEID4): Renamed to ... + (LHD_SANEID6): ... this. + (LBR_MAJORID, LBR_ELFMAJORID): New macros. + (struct vms_rfa): New structure. + (struct vms_idxdef): Renamed to ... + (struct vms_idx): ... this. + (struct vms_idxdef2): Renamed to ... + (struct vms_elfidx): ... this. + (ELFIDX__WEAK, ELFIDX__GROUP, ELFIDX__LISTRFA, ELFIDX__SYMESC): New + macros. + (struct vms_lhs, struct vms_lns): New structures. + (struct vms_mhd): Add missing fields. + (MHD__C_MHDLEN): New macro. + 2010-03-31 Tristan Gingold <gingold@adacore.com> * dcx.h: New file. diff --git a/include/vms/lbr.h b/include/vms/lbr.h index 768bc4c..7d6f597 100644 --- a/include/vms/lbr.h +++ b/include/vms/lbr.h @@ -25,9 +25,11 @@ /* Libray HeaDer. */ +/* Magic numbers. Should match the major version. */ + #define LHD_SANEID_DCX 319232342 #define LHD_SANEID3 233579905 -#define LHD_SANEID4 233579911 +#define LHD_SANEID6 233579911 /* Library type. */ #define LBR__C_TYP_UNK 0 /* Unknown / unspecified. */ @@ -40,6 +42,7 @@ #define LBR__C_TYP_EOBJ 7 /* Alpha object. */ #define LBR__C_TYP_ESHSTB 8 /* Alpha shareable image. */ #define LBR__C_TYP_IOBJ 9 /* IA-64 object. */ +#define LBR__C_TYP_ISHSTB 10 /* IA-64 shareable image. */ struct vms_lhd { @@ -120,6 +123,10 @@ struct vms_lhd unsigned char fill_4[4 * 13]; }; +/* Known major ids. */ +#define LBR_MAJORID 3 /* Alpha libraries. */ +#define LBR_ELFMAJORID 6 /* Elf libraries (new index, new data). */ + /* Offset of the first IDD. */ #define LHD_IDXDESC 196 @@ -158,34 +165,80 @@ struct vms_indexdef unsigned char parent[4]; unsigned char fill_1[6]; + + /* The key field contains vms_idxdef/vms_idxdef2 structures, which are + simply a key (= a string) and a rfa. */ unsigned char keys[INDEXDEF__BLKSIZ]; }; -/* Index keys. */ -struct vms_idxdef +/* An offset in a file. */ + +struct vms_rfa { + /* Logical block number, 1 based. + 0 means that the field is absent. Block size is 512. */ unsigned char vbn[4]; + + /* Offset within the block. */ unsigned char offset[2]; +}; + +/* Index keys. For version 3. */ + +struct vms_idx +{ + /* Offset from the start of the vbn, so minimum should be + DATA__DATA (ie 6). */ + struct vms_rfa rfa; unsigned char keylen; + /* The length of this field is in fact keylen. */ unsigned char keyname[256]; }; -struct vms_idxdef2 -{ - unsigned char vbn[4]; +/* Index keys, for version 4 and later. */ - /* Offset from the start of the vbn, so minimum should be - DATA__DATA (ie 6). */ - unsigned char offset[2]; +struct vms_elfidx +{ + struct vms_rfa rfa; unsigned char keylen[2]; - unsigned char fill_1; + unsigned char flags; unsigned char keyname[256]; }; +/* Flags of elfidx. */ + +#define ELFIDX__WEAK 0x01 /* Weak symbol. */ +#define ELFIDX__GROUP 0x02 /* Group symbol. */ +#define ELFIDX__LISTRFA 0x04 /* RFA field points to an LHS. */ +#define ELFIDX__SYMESC 0x08 /* Long symbol. */ + #define RFADEF__C_INDEX 0xffff +/* List head structure. That's what is pointed by rfa when LISTRFA flag + is set in elfidx. */ + +struct vms_lhs +{ + struct vms_rfa ng_g_rfa; /* Non-group global. */ + struct vms_rfa ng_wk_rfa; /* Non-group weak. */ + struct vms_rfa g_g_rfa; /* Group global. */ + struct vms_rfa g_wk_rfa; /* Group weak. */ + unsigned char flags; +}; + +/* List node structure. Fields of LHS point to this structure. */ + +struct vms_lns +{ + /* Next node in the list. */ + struct vms_rfa nxtrfa; + + /* Module associated with the key. */ + struct vms_rfa modrfa; +}; + struct vms_datadef { /* Number of records in this block. */ @@ -216,9 +269,15 @@ struct vms_mhd /* Ident or GSMATCH. */ unsigned char objidlng; unsigned char objid[31]; + + unsigned char pad1[3]; + unsigned char otherefcnt[4]; + unsigned char modsize[4]; + unsigned char pad2[4]; }; #define MHD__C_MHDID 0xad /* Value for id. */ +#define MHD__C_MHDLEN 16 /* Fixed part length. */ #define MHD__C_USRDAT 16 #define MHD__M_SELSRC 0x1 #define MHD__M_OBJTIR 0x2 |