Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-30268

objcopy doesn't align sections with --section-alignment/--set-section-alignment

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • rhel-9.5
    • CentOS Stream 9
    • binutils
    • None
    •  binutils-2.35.2-53.el9
    • None
    • None
    • 1
    • sst_pt_gcc
    • ssg_platform_tools
    • 19
    • 25
    • 1
    • False
    • Hide

      RHEL-9.5 development has not yet started and RHEL-9.4 changes now require exception+.

      So since this is not an exceptional fix, it must wait for RHEL-9.5 development to open.

      Show
      RHEL-9.5 development has not yet started and RHEL-9.4 changes now require exception+. So since this is not an exceptional fix, it must wait for RHEL-9.5 development to open.
    • No
    • Red Hat Enterprise Linux
    • GCC Sprint 6
    • None

      This is a result of a discussion in https://issues.redhat.com/browse/RHEL-26133. I'll quote Nick's comment below which describes the issue (or issues) very well:

      Right - I have tracked down the problem. There are in fact two issues. Firstly objcopy's --section-alignment option, despite its name, only sets the contents of the SectionAlignment field in the PE file format's optional header. It does not (or did not) actually affect the alignment of any sections.

      Secondly even setting the alignment with --set-section-alignment .sbat=512 does not work because all it does is to set the alignment field of the section. It does not force the section to change its virtual address to an aligned boundary.

      I am working on a patch to fix both of these problems. But unless this is a real issue for systemd I intend to contribute it upstream and wait for it to trickle down to Fedora and CentOS and RHEL via the usual mechanisms.

      (Quoted from https://issues.redhat.com/browse/RHEL-26133?focusedId=24391664&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-24391664)

            mprchlik@redhat.com Milos Prchlik
            fsumsalrh Frantisek Sumsal
            Nick Clifton Nick Clifton
            Milos Prchlik Milos Prchlik
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: