[PATCH v4 4/6] elf: Add _bfd_elf_mmap_section and _bfd_elf_munmap_section_contents

Alan Modra amodra@gmail.com
Fri Mar 8 03:33:57 GMT 2024


On Fri, Mar 08, 2024 at 12:50:44AM +0000, Sam James wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
> > --- a/bfd/elfxx-x86.h
> > +++ b/bfd/elfxx-x86.h
> > @@ -960,6 +960,7 @@ extern void _bfd_x86_elf_link_report_relative_reloc
> >    _bfd_elf_x86_size_relative_relocs
> >  #define elf_backend_finish_relative_relocs \
> >    _bfd_elf_x86_finish_relative_relocs
> > +#define elf_backend_use_mmap true
> 
> I'm a bit worried that yet-another-param is going to lead to it being
> forgotten about for most backends.

Well, yes, but I found two backends with bugs tickled by the mmap
patchset, and that was just with the binutils testsuite.
See pr31458 and pr31461.  Very likely there are other problems
lurking.  For now I think it is reasonable to leave the mmap change as
opt-in.  At some point we should change to opt-out.

> Maybe send out a request for testing once merged, asking people to test
> and enable it in their respective backends? It's very easy to miss
> otherwise.

Someone who builds lots of packages for a distro would be ideal for
that testing.  ;-)

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list