From 110a61d34220d41ade91b5e5159606588482d634 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 10 May 2013 13:08:24 +0000 Subject: XCOFF/AIX: Remove SEC_ALLOC flags for unmapped sections. The .except, .loader and .typchk are not mapped to memory, so do not set their SEC_ALLOC flag. bfd/ChangeLog: * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections. ld/testsuite/ChangeLog: * ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.hd, ld-powerpc/aix-core-sec-3.hd: Adjust expected section flags for section .loader. --- bfd/ChangeLog | 5 +++++ bfd/coffcode.h | 6 ++++++ ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-powerpc/aix-core-sec-1.hd | 2 +- ld/testsuite/ld-powerpc/aix-core-sec-2.hd | 2 +- ld/testsuite/ld-powerpc/aix-core-sec-3.hd | 2 +- 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e680c3a..eb254b7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-05-10 Joel Brobecker + + * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling + of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections. + 2013-05-09 Joel Brobecker * bfd.c (_bfd_default_error_handler): Replace use of putc diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 9d9c992..2a1a172 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -795,6 +795,12 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED, else if (styp_flags & STYP_PAD) sec_flags = 0; #ifdef RS6000COFF_C + else if (styp_flags & STYP_EXCEPT) + sec_flags |= SEC_LOAD; + else if (styp_flags & STYP_LOADER) + sec_flags |= SEC_LOAD; + else if (styp_flags & STYP_TYPCHK) + sec_flags |= SEC_LOAD; else if (styp_flags & STYP_DWARF) sec_flags |= SEC_DEBUGGING; #endif diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index a6919e3..ad0b000 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-05-10 Joel Brobecker + + * ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.hd, + ld-powerpc/aix-core-sec-3.hd: Adjust expected section flags + for section .loader. + 2013-05-03 Maciej W. Rozycki PR ld/15365 diff --git a/ld/testsuite/ld-powerpc/aix-core-sec-1.hd b/ld/testsuite/ld-powerpc/aix-core-sec-1.hd index 19d09e4..8d81e50 100644 --- a/ld/testsuite/ld-powerpc/aix-core-sec-1.hd +++ b/ld/testsuite/ld-powerpc/aix-core-sec-1.hd @@ -8,4 +8,4 @@ Sections: * 2 * \.bss * 0+0 .* * ALLOC * 3 * \.loader .* - * CONTENTS, ALLOC, LOAD + * CONTENTS, LOAD diff --git a/ld/testsuite/ld-powerpc/aix-core-sec-2.hd b/ld/testsuite/ld-powerpc/aix-core-sec-2.hd index 39facd8..1152013 100644 --- a/ld/testsuite/ld-powerpc/aix-core-sec-2.hd +++ b/ld/testsuite/ld-powerpc/aix-core-sec-2.hd @@ -8,4 +8,4 @@ Sections: * 2 * \.bss * 0+0 .* * ALLOC * 3 * \.loader .* - * CONTENTS, ALLOC, LOAD + * CONTENTS, LOAD diff --git a/ld/testsuite/ld-powerpc/aix-core-sec-3.hd b/ld/testsuite/ld-powerpc/aix-core-sec-3.hd index f7acc39..61a93ae 100644 --- a/ld/testsuite/ld-powerpc/aix-core-sec-3.hd +++ b/ld/testsuite/ld-powerpc/aix-core-sec-3.hd @@ -8,4 +8,4 @@ Sections: * 2 * \.bss * 0+8 .* * ALLOC * 3 * \.loader .* - * CONTENTS, ALLOC, LOAD + * CONTENTS, LOAD -- cgit v1.1