From 2842bb86fd3ac50af7309959d23d8e725683c91e Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Mon, 12 Jan 2009 17:29:25 +0000 Subject: [PATCH] pa.c (pa_asm_output_mi_thunk): Use pc-relative branch to thunk function when... * pa.c (pa_asm_output_mi_thunk): Use pc-relative branch to thunk function when not using named sections on targets with named sections if branch distance is less than 262132. From-SVN: r143300 --- gcc/ChangeLog | 6 ++++++ gcc/config/pa/pa.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0920534487f..a86f0095cc9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-01-12 John David Anglin + + * pa.c (pa_asm_output_mi_thunk): Use pc-relative branch to thunk + function when not using named sections on targets with named sections + if branch distance is less than 262132. + 2009-01-12 Richard Earnshaw * combine.c (combine_instructions): Recompute diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 44ded73f908..5e96120a64f 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -7980,6 +7980,10 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta, || ((DECL_SECTION_NAME (thunk_fndecl) == DECL_SECTION_NAME (function)) && last_address < 262132))) + || (targetm.have_named_sections + && DECL_SECTION_NAME (thunk_fndecl) == NULL + && DECL_SECTION_NAME (function) == NULL + && last_address < 262132) || (!targetm.have_named_sections && last_address < 262132)))) { if (!val_14)