From 5e180015287aaa8dc0a83043c2ccbda0a2af111d Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 28 Jan 2005 08:21:14 +0000 Subject: gas/ 2005-01-28 Jan Beulich * config/tc-ia64.c (ia64_estimate_size_before_relax): Allocate space for personality routine pointer only if there is one. (ia64_convert_frag): Likewise. (generate_unwind_image): Likewise. ld/testsuite/ 2005-01-28 Jan Beulich * ld/ia64/tlsbin.[rt]d: Widen expected offset/size ranges. * ld/ia64/tlspic.[rt]d: Likewise. --- gas/ChangeLog | 7 +++++++ gas/config/tc-ia64.c | 22 +++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 1d19938ce0..3ab47b349d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2005-01-28 Jan Beulich + + * config/tc-ia64.c (ia64_estimate_size_before_relax): Allocate space + for personality routine pointer only if there is one. + (ia64_convert_frag): Likewise. + (generate_unwind_image): Likewise. + 2005-01-27 Christian Groessler * config/tc-z8k.c (INSERT): Remove, not used anywhere. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 24fbadd5e3..21b62fb132 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -2863,8 +2863,11 @@ ia64_estimate_size_before_relax (fragS *frag, pad = len % md.pointer_size; if (pad != 0) len += md.pointer_size - pad; - /* Add 8 for the header + a pointer for the personality offset. */ - size = len + 8 + md.pointer_size; + /* Add 8 for the header. */ + size = len + 8; + /* Add a pointer for the personality offset. */ + if (frag->fr_offset) + size += md.pointer_size; /* fr_var carries the max_chars that we created the fragment with. We must, of course, have allocated enough memory earlier. */ @@ -2891,8 +2894,11 @@ ia64_convert_frag (fragS *frag) pad = len % md.pointer_size; if (pad != 0) len += md.pointer_size - pad; - /* Add 8 for the header + a pointer for the personality offset. */ - size = len + 8 + md.pointer_size; + /* Add 8 for the header. */ + size = len + 8; + /* Add a pointer for the personality offset. */ + if (frag->fr_offset) + size += md.pointer_size; /* fr_var carries the max_chars that we created the fragment with. We must, of course, have allocated enough memory earlier. */ @@ -3454,9 +3460,11 @@ generate_unwind_image (const segT text_seg) pad = size % md.pointer_size; if (pad != 0) size += md.pointer_size - pad; - /* Add 8 for the header + a pointer for the personality - offset. */ - size += 8 + md.pointer_size; + /* Add 8 for the header. */ + size += 8; + /* Add a pointer for the personality offset. */ + if (unwind.personality_routine) + size += md.pointer_size; } /* If there are unwind records, switch sections, and output the info. */ -- cgit v1.2.1