https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #13 from Pali Rohár ---
Nick, do you plan to update your change? I think it is a good starting point. I
would propose to do not allow these options to be available on non-PE targets
(e.g. ELF) as it can be confusing.
Just to note
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #12 from Pali Rohár ---
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#special-sections
Some section names are reserved and .text is really there with
IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_REA
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #11 from Nick Clifton ---
Created attachment 14926
--> https://sourceware.org/bugzilla/attachment.cgi?id=14926&action=edit
Proposed patch
Hi Pali,
OK, here is an initial patch to add support for the various IMAGE_SCN_...
fl
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #10 from Pali Rohár ---
Ah, flag 0x0002 has not only two differet names IMAGE_SCN_MEM_16BIT and
IMAGE_SCN_MEM_PURGEABLE, but also two different meanings. For
IMAGE_FILE_MACHINE_I386 it is means that section is 16-bit, for
IMAGE
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #9 from Pali Rohár ---
Ou, now I see that IMAGE_SCN_GPREL is alias for IMAGE_SCN_MEM_FARDATA and
IMAGE_SCN_MEM_16BIT alias for IMAGE_SCN_MEM_PURGEABLE. And these twos are
already in section_flag_xlat[].
And IMAGE_SCN_TYPE_DSECT is
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #8 from Pali Rohár ---
Thank you. I have looked at the change and from documented IMAGE_SCN_* flags at
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format and for dumping
in section_flag_xlat[] are missing: IMAGE_SCN_GP
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
Nick Clifton changed:
What|Removed |Added
Assignee|unassigned at sourceware dot org |nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #6 from Pali Rohár ---
IMAGE_SCN_LNK_REMOVE is valid only for object files, not for executables. But
yes, from above description exclude flag should be mapped to
IMAGE_SCN_LNK_REMOVE characteristics.
Also it would be great to sync
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #5 from Nick Clifton ---
(In reply to Pali Rohár from comment #4)
> So it looks like that IMAGE_SCN_MEM_READ characteristic is always added,
> IMAGE_SCN_MEM_WRITE characteristic is added only when readonly flag is not
> specified.
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #4 from Pali Rohár ---
So it looks like that IMAGE_SCN_MEM_READ characteristic is always added,
IMAGE_SCN_MEM_WRITE characteristic is added only when readonly flag is not
specified. And other flags add following characteristics:
a
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #3 from Pali Rohár ---
Ok, I have tested objcopy --set-section-flags on PE executable. Seems that it
is doing something, but only for some of the flags and I really do not
understand what it is doing. For me it looks like that objc
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #2 from Pali Rohár ---
In past I have tried to use objcopy --set-section-flags but it did not work, I
did not get expected result and I do not remember exact details. As you
mentioned this option, I will try it again with new binut
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
Nick Clifton changed:
What|Removed |Added
CC||nickc at redhat dot com
--- Comment #1
13 matches
Mail list logo