bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/30875] New: Output section type does not been applied to section


From: TheLastLin at hotmail dot com
Subject: [Bug ld/30875] New: Output section type does not been applied to section forced output by `. = .` assignment
Date: Tue, 19 Sep 2023 14:52:25 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30875

            Bug ID: 30875
           Summary: Output section type does not been applied to section
                    forced output by `. = .` assignment
           Product: binutils
           Version: 2.38
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: TheLastLin at hotmail dot com
  Target Milestone: ---

Created attachment 15118
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15118&action=edit
Workaround patch, set flags by sectype at exp_init_os and
map_input_to_output_sections:case lang_assignment_statement_enum

Sometimes we may want to keep some empty section from discarding with ` . = .
`. But it seems that such empty section don't apply specific output section
type.

Example linker script:

SECTIONS
{
    foo (READONLY) :
    {
     *(bar)
     . = . ;
    }
}

Expected(when bar doesn't exist in input):
section foo with no SHF_WRITE flags.

Actually(when bar doesn't exist in input):
section foo with SHF_WRITE flag.

A workaround is also

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]