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] |
On Fri, Mar 12, 2004 at 05:12:41PM +1030, Alan Modra wrote: > On Thu, Mar 11, 2004 at 09:34:19PM -0800, H. J. Lu wrote: > > unresolved_syms_in_shared_libs is for unresolved references in input > > shared libraries. unresolved_syms_in_objects is for unresolved > > references in input relocatable objects. When building shared libraries, > > we allow unresolved references in input relocatable objects by default. > > They are disallowed for executables. With "-z defs", we also disallow > > unresolved references in input relocatable objects when building > > shared library. > > I agree with all of this. It's exactly what I think ld should be doing > instead of the current code. > > What we currently have is messy code in lexsup.c that sets _both_ > unresolved_syms_in_shared_libs and unresolved_syms_in_objects, and then > code in elf-bfd.h and elsewhere that tests one or other of the flags > depending on info->shared or info->executable. That's what I think is > confusing. The unresolved_syms_in_* are all about input files, not > the particular output ld is producing, so there should be no need to > test output related flags like info->shared. Instead, use > unresolved_syms_in_* along with information about what sort of input > was unresolved. That's where I was heading with the untested patch > I wrote. > This is the patch to clean up this mess. unresolved_syms_in_objects is used on input relocatable files. unresolved_syms_in_shared_libs is only used when there is an undefined reference from a shared library. H.J.
Attachment:
binutils-elf-defs-2.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |