summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-12-15 10:56:46 +0000
committerTristan Gingold <gingold@adacore.com>2011-12-15 10:56:46 +0000
commit65fcfbd8e78197cd19e94b4e9250344a391d0377 (patch)
tree8d961149162da31f3e6126accedb80e392d989d1 /bfd
parentcf29a921aad9b63cc0778cdb37089dfbec39d17d (diff)
downloadgdb-65fcfbd8e78197cd19e94b4e9250344a391d0377.tar.gz
bfd/
2011-12-15 Iain Sandoe <iains@gcc.gnu.org> * mach-o-target.c (bfd_mach_o_bfd_set_private_flags): Use bfd_mach_o_bfd_set_private_flags. * mach-o.c (bfd_mach_o_bfd_set_private_flags): New. * mach-o.h (bfd_mach_o_bfd_set_private_flags): Declare. gas/ 2011-12-15 Iain Sandoe <iains@gcc.gnu.org> * config/obj-macho.c (obj_mach_o_subsections_by_symbols): New global. (obj_mach_o_file_properties): New enum. (obj_mach_o_subsections_via_symbols): Generalize name to... ... (obj_mach_o_fileprop) and use to set subsections_via_symbols. gas/testsuite/ 2011-12-15 Iain Sandoe <iains@gcc.gnu.org> * gas/mach-o/subsect-via-symbols-0.d: New. * gas/mach-o/subsect-via-symbols-1.d: New. * gas/mach-o/subsect-via-symbols.s: New.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/mach-o-target.c2
-rw-r--r--bfd/mach-o.c16
-rw-r--r--bfd/mach-o.h1
4 files changed, 25 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9e995a1f72d..e1cd2baa3df 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-15 Iain Sandoe <iains@gcc.gnu.org>
+
+ * mach-o-target.c (bfd_mach_o_bfd_set_private_flags): Use
+ bfd_mach_o_bfd_set_private_flags.
+ * mach-o.c (bfd_mach_o_bfd_set_private_flags): New.
+ * mach-o.h (bfd_mach_o_bfd_set_private_flags): Declare.
+
2011-12-14 Nick Clifton <nickc@redhat.com>
PR ld/12451
diff --git a/bfd/mach-o-target.c b/bfd/mach-o-target.c
index 4d5690e28a2..c91584c707e 100644
--- a/bfd/mach-o-target.c
+++ b/bfd/mach-o-target.c
@@ -46,7 +46,7 @@
#define bfd_mach_o_bfd_final_link _bfd_generic_final_link
#define bfd_mach_o_bfd_link_split_section _bfd_generic_link_split_section
#define bfd_mach_o_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data
-#define bfd_mach_o_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
+#define bfd_mach_o_bfd_set_private_flags bfd_mach_o_bfd_set_private_flags
#define bfd_mach_o_get_section_contents _bfd_generic_get_section_contents
#define bfd_mach_o_bfd_gc_sections bfd_generic_gc_sections
#define bfd_mach_o_bfd_lookup_section_flags bfd_generic_lookup_section_flags
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index c768689fda0..0c2c2f77e66 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -576,6 +576,22 @@ bfd_mach_o_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
return TRUE;
}
+/* This allows us to set up to 32 bits of flags (unless we invent some
+ fiendish scheme to subdivide). For now, we'll just set the file flags
+ without error checking - just overwrite. */
+
+bfd_boolean
+bfd_mach_o_bfd_set_private_flags (bfd *abfd, flagword flags)
+{
+ bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
+
+ if (!mdata)
+ return FALSE;
+
+ mdata->header.flags = flags;
+ return TRUE;
+}
+
/* Count the total number of symbols. */
static long
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 0c6f4fd01cb..e22b41a6022 100644
--- a/bfd/mach-o.h
+++ b/bfd/mach-o.h
@@ -555,6 +555,7 @@ bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data (bfd *, asymbol *,
bfd_boolean bfd_mach_o_bfd_copy_private_section_data (bfd *, asection *,
bfd *, asection *);
bfd_boolean bfd_mach_o_bfd_copy_private_bfd_data (bfd *, bfd *);
+bfd_boolean bfd_mach_o_bfd_set_private_flags (bfd *, flagword);
long bfd_mach_o_get_symtab_upper_bound (bfd *);
long bfd_mach_o_canonicalize_symtab (bfd *, asymbol **);
long bfd_mach_o_get_synthetic_symtab (bfd *, long, asymbol **, long,