This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Explicit PHDRS and empty sections


Hi David,

First of all, many apologies for taking so long to getting round to
reviewing your bug report and patch submission.

> To fix the above problems, I propose removing any section not marked
> SEC_ALLOC from the section -> segment mapping before assigning file
> positions in the assign_file_positions_for_segments() function.

This seems reasonable.

> There is a warning in the bfd library about empty loadable elf
> section headers.  I believe that the elf specification allows empty
> loadable headers and it is certainly easy to generate them with
> explicit PHDRS, thus I am unsure why this warning exists. I would
> like to remove this "Empty loadable segment detected" warning.

I do not think that this is a good idea.  An empty loadable segment is
of no use, and although it is allowable, it presence might be the
result of a bug somewhere else in the user's application.  Thus
producing a warning messages seems perfectly reasonable.  If the user
is expecting it then they can ignore it, otherwise they should
investigate their program to find out where the empty segment is being
produced.


> Included for consideration is a proposed patch to bfd/elf.c 
> (empty_ptload.patch)
> for both of the above problems and a testcase (phdrs2.exp, phdrs2.t and
> phdrs2.s) that can be added to the ld/testsuite/ld-scripts/ directory to
> validate it.

Thanks you very much for doing this.  Unfortunately we cannot
currently accept the patch and tests because you do not have a
binutils copyright assignment on file with the FSF.  Without such an
assignment we cannot accept contributions no matter how much we would
like to :-(  I am attaching an application form in case you do decide
to persue this matter and obtain an assignment.  (I hope that you will).

Cheers
        Nick

---------------------------------------------------------------------------

request-assign.future:

Please email the following information to fsf-records@gnu.org, and we
will send you the assignment form for your past and future changes.
Please use your full name as the subject line of the message.


[What is the name of the program or package you're contributing to?]


[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]


[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]


[For the copyright registration, what country are you a citizen of?]


[What year were you born?]


[Please write your email address here.]


[Please write your snail address here.]





[Which files have you changed so far, and which new files have you written
so far?]





---------------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]