[patch x64 SEH]: Support xdata/pdata for link-once code

Kai Tietz ktietz70@googlemail.com
Tue Sep 14 17:06:00 GMT 2010


2010/9/14 Richard Henderson <rth@redhat.com>:
> On 09/13/2010 01:25 AM, Kai Tietz wrote:
>> +/* Private segment collection list.  */
>> +struct seh_seg_list {
>> +  struct seh_seg_list *next;
>> +  segT seg;
>> +  int subseg;
>> +};
>
> I think we'd be better off using either "splay-tree.h" or
> "hashtab.h" from libiberty.

Hmm, is there such a mass of different code-segments to be expected
within one file that we will see here a real gain using hash-tables?

>> +  /* Check if code segment is marked as linked once.  */
>> +  flags = bfd_get_section_flags (stdoutput, seg);
>> +  flags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD | SEC_LINK_DUPLICATES_ONE_ONLY
>> +    | SEC_LINK_DUPLICATES_SAME_SIZE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
> ...
>> +  /* Apply possibly lined once flags to new generated segment, too.  */
>> +  flags |= bfd_get_section_flags (stdoutput, in->seg);
>
> Separating these two bits of code is confusing.  I initially
> wrote a sentence saying you weren't masking off the bits
> properly.  That said, I don't think you really need to
> propagate default flags from .[px]data itself.  Just OR in
>
>  SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA.
Ok, done.

Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: discardable_seh.diff
Type: application/octet-stream
Size: 19459 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100914/8d811bf9/attachment.obj>


More information about the Binutils mailing list