[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics |
Date: |
Wed, 17 May 2023 15:06:18 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30145
--- Comment #5 from Nick Clifton <nickc at redhat dot com> ---
(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. And other flags add following characteristics:
>
> alloc --> IMAGE_SCN_CNT_UNINITIALIZED_DATA
> noload --> IMAGE_SCN_MEM_DISCARDABLE
> debug --> IMAGE_SCN_CNT_INITIALIZED_DATA + IMAGE_SCN_MEM_DISCARDABLE
> code --> IMAGE_SCN_CNT_CODE + IMAGE_SCN_MEM_EXECUTE
> data --> IMAGE_SCN_CNT_INITIALIZED_DATA
> exclude --> IMAGE_SCN_MEM_DISCARDABLE
> share --> IMAGE_SCN_MEM_SHARED
OK, so obviously it would be good to extend the list of supported flags to
include the PE names. I will have a look at doing this.
> What is difference between noload and exclude? Seems that both flags do same
> thing.
Well for ELF based targets the exclude flag marks a section which should be
discarded unless a partial link is being performed. That is they are kept
around if linking with the -r or --relocateable options, but otherwise they are
discarded. The noload flag marks a section which is not normally discarded,
but which also is not loaded into memory when the application runs.
In theory the exclude flag should probably map to the IMAGE_SCN_LNK_REMOVE
flag, but this does not appear to happen in practice. At least not at the
moment.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, pali at kernel dot org, 2023/05/08
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics,
nickc at redhat dot com <=
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, pali at kernel dot org, 2023/05/17
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, nickc at redhat dot com, 2023/05/25
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, pali at kernel dot org, 2023/05/27
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, pali at kernel dot org, 2023/05/27
- [Bug ld/30145] No way to specify PE IMAGE_SCN_* characteristics, pali at kernel dot org, 2023/05/28