This is the mail archive of the binutils@sourceware.org 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: [PATCH] Support 'exclude' in objcopy --set-section-flags


Hi Fangrui,

> Thanks! I'm curious to learn what SHF_MASKPROC tests on what archs are affected,
> and how you made the test.

Well I have a build-lots-of-toolchains script that I run to test patches.
These are the linker failures that show up with that change to elf.c applied:

  LD REGRESSION: ld-elf/exclude3c    
  LD REGRESSION: ld-elf/pr20528a    
  LD REGRESSION: ld-elf/pr20528b    

This is for lots of architectures (x86_64, arm, aarch64, ppc, etc).  Now it may
well be that these tests are inaccurate and need to be updated.  But that
should be done in sync with applying the patch, rather than afterwards.


> The main issue is that (SHF_EXCLUDE & SHF_MASKPROC) != 0.
> SHF_EXCLUDE = SHF_ARM_COMDEF = SHF_MIPS_STRINGS = SHF_PARISC_SBP

Which implies that the value being used for SHF_EXCLUDE is wrong.  It
ought to be a generic value.  I assume that it is too late to change 
this however.

So it seems to me that what we need to do is to provide a backend
hook to handle the copying of OS/PROC flag bits from an input bfd to 
an output bfd.  The default could be to strip the SHF_EXCLUDE, but
backends should be able to decide.

Cheers
  Nick



  


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