diff options
author | Timothy Wall <twall@alum.mit.edu> | 2000-04-18 02:21:27 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2000-04-18 02:21:27 +0000 |
commit | 654d636defaf401ad1382788e6128b55c13720de (patch) | |
tree | f46ac54f15b9e4495eb2a11a753eba4ac8c36c86 /include/coff/ti.h | |
parent | 45c68d3b99cb5c11b8d3c9af9740b20e1d5410fc (diff) | |
download | binutils-redhat-654d636defaf401ad1382788e6128b55c13720de.tar.gz |
Clean up load page support for tic54x.
Diffstat (limited to 'include/coff/ti.h')
-rw-r--r-- | include/coff/ti.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/include/coff/ti.h b/include/coff/ti.h index 306ad7b2c2..fb3456d87f 100644 --- a/include/coff/ti.h +++ b/include/coff/ti.h @@ -71,12 +71,10 @@ struct external_filehdr { #define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID) /* we need to read/write an extra field in the coff file header */ -/* FIXME load page */ #ifndef COFF_ADJUST_FILEHDR_IN_POST #define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \ do { ((struct internal_filehdr *)(dst))->f_target_id = \ bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \ -/*((struct internal_filehdr *)(dst))->f_flags |= F_LDPAGE;*/ \ } while(0) #endif @@ -161,9 +159,6 @@ struct external_scnhdr { /* * Special section flags */ -/* recognized load pages */ -#define PG_PROG 0x0 /* PROG page */ -#define PG_DATA 0x1 /* DATA page */ /* TI COFF defines these flags; STYP_CLINK: the section should be excluded from the final @@ -212,18 +207,15 @@ bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8)) #define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \ bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP) -/* FIXME load page #define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \ do { ((struct internal_scnhdr *)(INT))->s_page = \ GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \ } while(0) -*/ /* The line number and reloc overflow checking in coff_swap_scnhdr_out in coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc. Due to different sized v0/v1/v2 section headers, we have to re-write these fields. - FIXME load page */ #define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \ do { \ @@ -233,13 +225,13 @@ PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\ (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \ PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \ (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \ -/*PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \ - (bfd_byte *)((SCNHDR *)(EXT))->s_page);*/ \ +PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \ + (bfd_byte *)((SCNHDR *)(EXT))->s_page); \ } while(0) -/* page macros +/* Page macros - the first GDB port requires flags in its remote memory access commands to + The first GDB port requires flags in its remote memory access commands to distinguish between data/prog space. hopefully we can make this go away eventually. stuff the page in the upper bits of a 32-bit address, since the c5x family only uses 16 or 23 bits. @@ -250,12 +242,13 @@ PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \ addresses. */ -#define LONG_ADDRESSES 1 -#define PG_SHIFT (LONG_ADDRESSES ? 30 : 16) -#define ADDR_MASK (((unsigned long) 1 << PG_SHIFT) - 1) -#define PG_MASK ((unsigned long) 3 << PG_SHIFT) -#define PG_TO_FLAG(p) ((p) << PG_SHIFT) -#define FLAG_TO_PG(f) (((f) & PG_MASK) >> PG_SHIFT) +/* recognized load pages */ +#define PG_PROG 0x0 /* PROG page */ +#define PG_DATA 0x1 /* DATA page */ + +#define ADDR_MASK 0x00FFFFFF +#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24) +#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF) /* * names of "special" sections |