* Types table size and format in the .gcc_exception_table
@ 2013-01-07 21:31 Shahid Alam
2013-01-08 7:09 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Shahid Alam @ 2013-01-07 21:31 UTC (permalink / raw)
To: gcc-help; +Cc: Shahid Alam
As part of my research I am updating the .gcc_exception_table of a
binary 64 bit elf file. For small C++ programs that throw exceptions it
works OK, but for large benchmark programs it's not working. My question
is does GCC stores more than one table inside the .gcc_exception_table
section of the elf file. If it does what's the exact format of these
tables. I have some knowledge of the action table, action records and
types table. I am not clear about the size of the types table.
I am parsing the tables in this section but is not able to know the
exact size and format of the types tables, where a pointer to the
exception information is stored. I need to update this pointer to the
new updated location.
Any help is appreciated.
Thanks,
-- Shahid
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Types table size and format in the .gcc_exception_table
2013-01-07 21:31 Types table size and format in the .gcc_exception_table Shahid Alam
@ 2013-01-08 7:09 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2013-01-08 7:09 UTC (permalink / raw)
To: Shahid Alam; +Cc: gcc-help, Shahid Alam
On Mon, Jan 7, 2013 at 1:13 PM, Shahid Alam <alam_shahid@yahoo.com> wrote:
> As part of my research I am updating the .gcc_exception_table of a binary 64
> bit elf file. For small C++ programs that throw exceptions it works OK, but
> for large benchmark programs it's not working. My question is does GCC
> stores more than one table inside the .gcc_exception_table section of the
> elf file. If it does what's the exact format of these tables. I have some
> knowledge of the action table, action records and types table. I am not
> clear about the size of the types table.
>
> I am parsing the tables in this section but is not able to know the exact
> size and format of the types tables, where a pointer to the exception
> information is stored. I need to update this pointer to the new updated
> location.
I documented the .gcc_except_table section at
http://www.airs.com/blog/archives/464 .
Yes, there is normally more than one table (one LSDA) in the
.gcc_except_table section. There is normally one LSDA per function
that needs to handle exceptions. Each such function will have a
pointer to the LSDA in its FDE entry in the .eh_frame section, as
described at http://www.airs.com/blog/archives/460 .
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-08 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-07 21:31 Types table size and format in the .gcc_exception_table Shahid Alam
2013-01-08 7:09 ` 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).