X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fbfd-in.h;h=99cafba14770a6de50530d67165e99e1cceb6f02;hb=0b31a4bcec2efec9bc8ca40deb61123c52690a2e;hp=656d991ccf404a36f4c97389464ce5cebb70b289;hpb=14b57c7c6a53c747a8819fed3da858eae4195a0e;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 656d991ccf..99cafba147 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -256,7 +256,7 @@ struct orl /* Output ranlib. */ } u; /* bfd* or file position. */ int namidx; /* Index into string table. */ }; - + /* Linenumber stuff. */ typedef struct lineno_cache_entry { @@ -270,11 +270,19 @@ typedef struct lineno_cache_entry alent; /* Object and core file sections. */ +typedef struct bfd_section *sec_ptr; #define align_power(addr, align) \ (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align)))) -typedef struct bfd_section *sec_ptr; +/* 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. 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) \ + ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \ + ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \ + : ~ (bfd_vma) 0) #define bfd_get_section_name(bfd, ptr) ((void) bfd, (ptr)->name) #define bfd_get_section_vma(bfd, ptr) ((void) bfd, (ptr)->vma) @@ -511,7 +519,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); #define bfd_get_file_flags(abfd) ((abfd)->flags) #define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags) #define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags) -#define bfd_my_archive(abfd) ((abfd)->my_archive) #define bfd_has_map(abfd) ((abfd)->has_armap) #define bfd_is_thin_archive(abfd) ((abfd)->is_thin_archive)