aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorAndrew Dixie <andrewd@gentrack.com>2015-09-18 14:10:36 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2015-09-18 10:10:36 -0400
commit04218b3564e3462d2e68c11548299d7359ad8c17 (patch)
treea2da31202b08fdaf8e1ee8716ea6db02c1e77164 /gcc/dwarf2out.c
parent8cd60b238b40e06647938ef44114da23b6d27391 (diff)
downloadgcc-04218b3564e3462d2e68c11548299d7359ad8c17.zip
gcc-04218b3564e3462d2e68c11548299d7359ad8c17.tar.gz
gcc-04218b3564e3462d2e68c11548299d7359ad8c17.tar.bz2
config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts.
libgcc/ * config.host (powerpc-ibm-aix*): Add crtdbase.o to extra_parts. * config/rs6000/crtdbase.S: New file. * config/rs6000/t-aix-cxa: Build crtdbase.o. gcc/ * defaults.h (EH_FRAME_SECTION_NAME): Depend on EH_FRAME_THROUGH_COLLECT2. * dwarf2asm.c (dw2_asm_output_encoded_addr_rtx): Add case for DW_EH_PE_datarel. * dwarf2out.c (switch_to_eh_frame_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. Restrict special collect2 labels to EH_FRAME_THROUGH_COLLECT2. * except.c (switch_to_exception_section): Use a read-only section even if EH_FRAME_SECTION_NAME is undefined. * system.h (EH_FRAME_IN_DATA_SECTION): Poison. * collect2.c (write_c_file_stat): Provide dbase on AIX. (scan_prog_file): Don't export __dso_handle nor __gcc_unwind_dbase. * config/rs6000/aix.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. (ASM_OUTPUT_DWARF_PCREL): Define. (ASM_OUTPUT_DWARF_DATAREL): Define. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_FRAME_IN_DATA_SECTION): Delete. * config/rs6000/rs6000.c (rs6000_aix_asm_output_dwarf_pcrel): New. (rs6000_aix_asm_output_dwarf_datarel): New. (rs6000_xcoff_asm_init_sections): Don't set exception_section. * config/spu/spu-elf.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. * config/i386/i386-interix.h (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): Define. (EH_TABLES_CAN_BE_READ_ONLY): Define. * doc/tm.texi.in (EH_FRAME_IN_DATA_SECTION): Delete. (EH_FRAME_THROUGH_COLLECT2): New. (ASM_OUTPUT_DWARF_DATAREL): New. * doc/tm.texi: Regenerate. Co-Authored-By: David Edelsohn <dje.gcc@gmail.com> From-SVN: r227906
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2fd889a..4a1c152 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -438,7 +438,6 @@ switch_to_eh_frame_section (bool back)
{
tree label;
-#ifdef EH_FRAME_SECTION_NAME
if (eh_frame_section == 0)
{
int flags;
@@ -466,27 +465,29 @@ switch_to_eh_frame_section (bool back)
}
else
flags = SECTION_WRITE;
+
+#ifdef EH_FRAME_SECTION_NAME
eh_frame_section = get_section (EH_FRAME_SECTION_NAME, flags, NULL);
- }
+#else
+ eh_frame_section = ((flags == SECTION_WRITE)
+ ? data_section : readonly_data_section);
#endif /* EH_FRAME_SECTION_NAME */
+ }
- if (eh_frame_section)
- switch_to_section (eh_frame_section);
- else
- {
- /* We have no special eh_frame section. Put the information in
- the data section and emit special labels to guide collect2. */
- switch_to_section (data_section);
+ switch_to_section (eh_frame_section);
- if (!back)
- {
- label = get_file_function_name ("F");
- ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
- targetm.asm_out.globalize_label (asm_out_file,
- IDENTIFIER_POINTER (label));
- ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
- }
+#ifdef EH_FRAME_THROUGH_COLLECT2
+ /* We have no special eh_frame section. Emit special labels to guide
+ collect2. */
+ if (!back)
+ {
+ label = get_file_function_name ("F");
+ ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
+ targetm.asm_out.globalize_label (asm_out_file,
+ IDENTIFIER_POINTER (label));
+ ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
}
+#endif
}
/* Switch [BACK] to the eh or debug frame table section, depending on