aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog10
-rw-r--r--bfd/bfd-in.h12
-rw-r--r--bfd/bfd-in2.h12
-rw-r--r--bfd/elf32-ppc.c4
-rw-r--r--bfd/elf32-ppc.h2
-rw-r--r--bfd/libbfd-in.h9
-rw-r--r--bfd/libbfd.h9
7 files changed, 35 insertions, 23 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ec8fd85..2c67bd7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2016-07-16 Alan Modra <amodra@gmail.com>
+
+ * libbfd-in.h (BFD_ALIGN): Move to..
+ * bfd-in.h: ..here.
+ * elf32-ppc.h (struct ppc_elf_params): Add pagesize.
+ * elf32-ppc.c (default_params): Adjust init.
+ (ppc_elf_link_params): Set pagesize_p2.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
2016-07-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
* elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook.
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index a7532c5..99cafba 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)
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 3f2d93b..5fffc46 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -263,7 +263,7 @@ struct orl /* Output ranlib. */
} u; /* bfd* or file position. */
int namidx; /* Index into string table. */
};
-
+
/* Linenumber stuff. */
typedef struct lineno_cache_entry
{
@@ -277,11 +277,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)
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 95ce1dc..b1c75a6 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3365,7 +3365,8 @@ static struct bfd_link_hash_table *
ppc_elf_link_hash_table_create (bfd *abfd)
{
struct ppc_elf_link_hash_table *ret;
- static struct ppc_elf_params default_params = { PLT_OLD, 0, 1, 0, 0, 12, 0 };
+ static struct ppc_elf_params default_params
+ = { PLT_OLD, 0, 1, 0, 0, 12, 0, 0 };
ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table));
if (ret == NULL)
@@ -3411,6 +3412,7 @@ ppc_elf_link_params (struct bfd_link_info *info, struct ppc_elf_params *params)
if (htab)
htab->params = params;
+ params->pagesize_p2 = bfd_log2 (params->pagesize);
}
/* Create .got and the related sections. */
diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h
index dd26bd6..5f3a88b 100644
--- a/bfd/elf32-ppc.h
+++ b/bfd/elf32-ppc.h
@@ -48,6 +48,8 @@ struct ppc_elf_params
/* The bfd backend detected a non-PIC reference to a protected symbol
defined in a shared library. */
int pic_fixup;
+
+ bfd_vma pagesize;
};
void ppc_elf_link_params (struct bfd_link_info *, struct ppc_elf_params *);
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 8644d8d..cde3aad 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -28,15 +28,6 @@
extern "C" {
#endif
-/* 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)
-
/* If you want to read and write large blocks, you might want to do it
in quanta of this amount */
#define DEFAULT_BUFFERSIZE 8192
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 2b1777e..eb6312b 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -33,15 +33,6 @@
extern "C" {
#endif
-/* 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)
-
/* If you want to read and write large blocks, you might want to do it
in quanta of this amount */
#define DEFAULT_BUFFERSIZE 8192