public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* .text, text.hot and text.unlikeley
@ 2009-08-28 14:35 Madhan Sadasivam
  2009-08-28 17:55 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Madhan Sadasivam @ 2009-08-28 14:35 UTC (permalink / raw)
  To: gcc-help

Hello,

Valgrind, the memory error checker does not expect
text.hot and text.unlikeley sections in binaries.

Though everything runs fine, the symbols in these files
are not remembered by Valgrind and hence error
stack traces do not have function names for objects
in these two sections.

The ideal solution is to make Valgrind take care of it.
A quicker way is to merge the 3 text sections as one.
i.e merge text.hot and text.unlikeley into one big ".text"

Is this a sensible thing to do.
Is it possible to do this with any of the binutils tools.

Thanks,
Madhan.

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

* Re: .text, text.hot and text.unlikeley
  2009-08-28 14:35 .text, text.hot and text.unlikeley Madhan Sadasivam
@ 2009-08-28 17:55 ` Ian Lance Taylor
  2009-09-01 13:48   ` Madhan Sadasivam
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2009-08-28 17:55 UTC (permalink / raw)
  To: Madhan Sadasivam; +Cc: gcc-help

Madhan Sadasivam <madhansivam@gmail.com> writes:

> Valgrind, the memory error checker does not expect
> text.hot and text.unlikeley sections in binaries.
>
> Though everything runs fine, the symbols in these files
> are not remembered by Valgrind and hence error
> stack traces do not have function names for objects
> in these two sections.
>
> The ideal solution is to make Valgrind take care of it.
> A quicker way is to merge the 3 text sections as one.
> i.e merge text.hot and text.unlikeley into one big ".text"
>
> Is this a sensible thing to do.
> Is it possible to do this with any of the binutils tools.

You can modify the linker script (printed by ld --verbose) to put
.text.hot* and .text.unlikely* into the .text section.  For more details
see the GNU linker documentation.  Note that the GNU linker is not part
of gcc, it is part of the GNU binutils, a separate project.

Ian

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

* Re: .text, text.hot and text.unlikeley
  2009-08-28 17:55 ` Ian Lance Taylor
@ 2009-09-01 13:48   ` Madhan Sadasivam
  2009-09-01 14:47     ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Madhan Sadasivam @ 2009-09-01 13:48 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Ian,

Thanks for the help. It has certainly worked.

There is also a new .data1 section.
Is this related to text.hot or text.unlikely by any chance.

Thanks,
Madhan.

On Fri, Aug 28, 2009 at 7:46 PM, Ian Lance Taylor<iant@google.com> wrote:
> Madhan Sadasivam <madhansivam@gmail.com> writes:
>
>> Valgrind, the memory error checker does not expect
>> text.hot and text.unlikeley sections in binaries.
>>
>> Though everything runs fine, the symbols in these files
>> are not remembered by Valgrind and hence error
>> stack traces do not have function names for objects
>> in these two sections.
>>
>> The ideal solution is to make Valgrind take care of it.
>> A quicker way is to merge the 3 text sections as one.
>> i.e merge text.hot and text.unlikeley into one big ".text"
>>
>> Is this a sensible thing to do.
>> Is it possible to do this with any of the binutils tools.
>
> You can modify the linker script (printed by ld --verbose) to put
> .text.hot* and .text.unlikely* into the .text section.  For more details
> see the GNU linker documentation.  Note that the GNU linker is not part
> of gcc, it is part of the GNU binutils, a separate project.
>
> Ian
>

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

* Re: .text, text.hot and text.unlikeley
  2009-09-01 13:48   ` Madhan Sadasivam
@ 2009-09-01 14:47     ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2009-09-01 14:47 UTC (permalink / raw)
  To: Madhan Sadasivam; +Cc: gcc-help

Madhan Sadasivam <madhansivam@gmail.com> writes:

> There is also a new .data1 section.
> Is this related to text.hot or text.unlikely by any chance.

Not to my knowledge.  I don't know where that is coming from.

Ian

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

end of thread, other threads:[~2009-09-01 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-28 14:35 .text, text.hot and text.unlikeley Madhan Sadasivam
2009-08-28 17:55 ` Ian Lance Taylor
2009-09-01 13:48   ` Madhan Sadasivam
2009-09-01 14:47     ` Ian Lance Taylor

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).