diff options
Diffstat (limited to 'include/coff')
-rw-r--r-- | include/coff/ChangeLog | 7 | ||||
-rw-r--r-- | include/coff/ti.h | 36 |
2 files changed, 25 insertions, 18 deletions
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog index f9e1fea..35988e3 100644 --- a/include/coff/ChangeLog +++ b/include/coff/ChangeLog @@ -1,3 +1,10 @@ +2003-08-07 Alan Modra <amodra@bigpond.net.au> + + * ti.h (GET_SCNHDR_NRELOC): Rename PTR param to LOC. + (PUT_SCNHDR_NRELOC, GET_SCNHDR_NLNNO, PUT_SCNHDR_NLNNO): Likewise. + (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Likewise. + (GET_SCNHDR_PAGE, PUT_SCNHDR_PAGE): Likewise. + 2003-07-17 Jeff Muizelaar <muizelaar@rogers.com> * pe.h: (IMAGE_FILE_NET_RUN_FROM_SWAP): Define. diff --git a/include/coff/ti.h b/include/coff/ti.h index 8df1522..a15fe71 100644 --- a/include/coff/ti.h +++ b/include/coff/ti.h @@ -2,7 +2,7 @@ customized in a target-specific file, and then this file included (see tic54x.h for an example). - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -215,25 +215,25 @@ struct external_scnhdr { Assume we're dealing with the COFF2 scnhdr structure, and adjust accordingly */ -#define GET_SCNHDR_NRELOC(ABFD, PTR) \ - (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR)) -#define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \ - (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR)) -#define GET_SCNHDR_NLNNO(ABFD, PTR) \ - (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2)) -#define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \ - (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2)) -#define GET_SCNHDR_FLAGS(ABFD, PTR) \ - (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4)) -#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \ - (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4)) -#define GET_SCNHDR_PAGE(ABFD, PTR) \ - (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7)) +#define GET_SCNHDR_NRELOC(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC)) +#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC)) +#define GET_SCNHDR_NLNNO(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2)) +#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2)) +#define GET_SCNHDR_FLAGS(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4)) +#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \ + (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4)) +#define GET_SCNHDR_PAGE(ABFD, LOC) \ + (COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7)) /* on output, make sure that the "reserved" field is zero */ -#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \ +#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \ (COFF2_P (ABFD) \ - ? H_PUT_16 (ABFD, VAL, PTR) \ - : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8)) + ? H_PUT_16 (ABFD, VAL, LOC) \ + : H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8)) /* TI COFF stores section size as number of bytes (address units, not octets), so adjust to be number of octets, which is what BFD expects */ |