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

Richard Henderson rth@redhat.com
Tue Sep 14 16:04:00 GMT 2010


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.

> +  /* 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.



r~



More information about the Binutils mailing list