public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Delaying fills generation while ordering sections in gold.
@ 2011-02-12  1:54 Sriraman Tallam
  2011-02-12  2:10 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Sriraman Tallam @ 2011-02-12  1:54 UTC (permalink / raw)
  To: binutils, Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

Hi,

   I have attached a simple patch to delay fills generation for output
sections when input sections could be reordered using
--section-ordering-file flag.


	* output.cc (Output_section::add_input_section): Delay fill
	generation for section ordering.



Thanks,
-Sri.

[-- Attachment #2: gold_patch.txt --]
[-- Type: text/plain, Size: 1159 bytes --]

Index: output.cc
===================================================================
RCS file: /cvs/src/src/gold/output.cc,v
retrieving revision 1.139
diff -u -u -p -r1.139 output.cc
--- output.cc	16 Nov 2010 19:18:31 -0000	1.139
+++ output.cc	12 Feb 2011 01:48:50 -0000
@@ -2111,12 +2111,14 @@ Output_section::add_input_section(Layout
 
   // Determine if we want to delay code-fill generation until the output
   // section is written.  When the target is relaxing, we want to delay fill
-  // generating to avoid adjusting them during relaxation.
+  // generating to avoid adjusting them during relaxation.  Also, if we are
+  // sorting input sections we must delay fill generation.
   if (!this->generate_code_fills_at_write_
       && !have_sections_script
       && (sh_flags & elfcpp::SHF_EXECINSTR) != 0
       && parameters->target().has_code_fill()
-      && parameters->target().may_relax())
+      && (parameters->target().may_relax()
+          || parameters->options().section_ordering_file()))
     {
       gold_assert(this->fills_.empty());
       this->generate_code_fills_at_write_ = true;
cvs diff: Diffing po
cvs diff: Diffing testsuite

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Delaying fills generation while ordering sections in gold.
  2011-02-12  1:54 Delaying fills generation while ordering sections in gold Sriraman Tallam
@ 2011-02-12  2:10 ` Ian Lance Taylor
  2011-02-12  3:20   ` Sriraman Tallam
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2011-02-12  2:10 UTC (permalink / raw)
  To: Sriraman Tallam; +Cc: binutils

Sriraman Tallam <tmsriram@google.com> writes:

> 	* output.cc (Output_section::add_input_section): Delay fill
> 	generation for section ordering.

This is OK.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Delaying fills generation while ordering sections in gold.
  2011-02-12  2:10 ` Ian Lance Taylor
@ 2011-02-12  3:20   ` Sriraman Tallam
  0 siblings, 0 replies; 3+ messages in thread
From: Sriraman Tallam @ 2011-02-12  3:20 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: binutils

Thanks, committed.

On Fri, Feb 11, 2011 at 6:10 PM, Ian Lance Taylor <iant@google.com> wrote:
> Sriraman Tallam <tmsriram@google.com> writes:
>
>>       * output.cc (Output_section::add_input_section): Delay fill
>>       generation for section ordering.
>
> This is OK.
>
> Thanks.
>
> Ian
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-12  3:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-12  1:54 Delaying fills generation while ordering sections in gold Sriraman Tallam
2011-02-12  2:10 ` Ian Lance Taylor
2011-02-12  3:20   ` Sriraman Tallam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).