[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/3] build32: don't discard .shstrtab in linker script


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 1 Jun 2020 11:12:56 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 01 Jun 2020 09:13:45 +0000
  • Ironport-sdr: viemTyYNZzVUTDSU1LA4Tvf48+n77yXbjI0CMcFyKg5TBDNA9LGYwIdZRKLCZN2TM6NUDhM3wP FTeQgmOXn7NxK2TVdwBOB1mzuCuS0DywKcIXE8DrWZTyXRN9iwBAqTtPhfYVvHY+1LCSX1tn4i 39nT61HGHrp9rrXvXVFo8f6mQeIEDQLKjhKRi9Rs4KuvZwVQQn+JlZmbHLJDYc5sUQvsh5ugsn YFXP+OLx5nbw7ZWjBQr1qiUBTbODiqxKs9CSfZD6+Ff+TdiM5n2VUlmogBApYLy2k/yWcTCdyX iFE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, May 29, 2020 at 05:45:44PM +0200, Jan Beulich wrote:
> On 28.05.2020 16:40, Roger Pau Monne wrote:
> > LLVM linker doesn't support discarding .shstrtab, and complains with:
> > 
> > ld -melf_i386_fbsd -N -T build32.lds -o reloc.lnk reloc.o
> > ld: error: discarding .shstrtab section is not allowed
> 
> Well, yes, GNU ld is more intelligent and doesn't extend the
> discarding to the control sections in the first place. All
> of .symtab, .strtab, and .shstrtab are still there.
> 
> > Add an explicit .shstrtab section to the linker script after the text
> > section in order to make LLVM LD happy.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Assuming the change was tested to not confuse GNU ld
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Yes, it's been tested on the gitlab CI, no issues reported on any of
the builds:

https://gitlab.com/xen-project/people/royger/xen/pipelines/151009839

> I wouldn't mind extending this to the other two control
> sections named above. In case the binaries need picking
> apart, them being present is surely helpful.

I don't mind extending, it might make sense in case linkers start
complaining about trying to discard those too.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.