diff options
author | Michael Meissner <gnu@the-meissners.org> | 1998-02-05 19:29:29 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1998-02-05 19:29:29 +0000 |
commit | 29b7118aec42737536c9e593208d7968c1220fe8 (patch) | |
tree | 388aa380fcfb98af57b7b30b255aeef8dd47fdc7 /bfd/libbfd.h | |
parent | fa1a1b3235e5a1b93ac38c69dbefab953023b58e (diff) | |
download | gdb-29b7118aec42737536c9e593208d7968c1220fe8.zip gdb-29b7118aec42737536c9e593208d7968c1220fe8.tar.gz gdb-29b7118aec42737536c9e593208d7968c1220fe8.tar.bz2 |
Do not allow BFD_ALIGN to wrap
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r-- | bfd/libbfd.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 11bfcee..6af5ca2 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -24,9 +24,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Align an address upward to a boundary, expressed as a number of bytes. - E.g. align to an 8-byte boundary with argument of 8. */ -#define BFD_ALIGN(this, boundary) \ - ((( (this) + ((boundary) -1)) & (~((boundary)-1)))) + E.g. align to an 8-byte boundary with argument of 8. Take care never + to wrap around if the address is within boundary-1 of the end of the + address space. */ +#define BFD_ALIGN(this, boundary) \ + ((((this) + (boundary) - 1) >= (this)) \ + ? (((this) + ((boundary) - 1)) & (~((boundary)-1))) \ + : ~ (bfd_vma) 0) /* If you want to read and write large blocks, you might want to do it in quanta of this amount */ @@ -808,6 +812,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MN10300_32_PCREL", "BFD_RELOC_MN10300_16_PCREL", + "BFD_RELOC_TIC30_LDP", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif |