objdump yields empty results in GCC 5.2.1

Asked by Arif Erman Kulunyar

Hello,

I updated the GCC version from 4.7.4 to 5.2.1, maintaining the same compile options.

In GCC 4.7.4 I was able to use objdump on object files. However in GCC 5.2.1, the objdump gives empty output other than the file name and endian format.

Command (works fine with GCC 4.7.4):

arm-none-eabi-objdump -d -marm my_file.o

Output in GCC 5.2.1:

my_file.o: file format elf32-littlearm

Is there a known solution or any specific requirement for GCC 5.2.1?

Thank you,

Erman

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Andre Vieira
Solved:
Last query:
Last reply:
Revision history for this message
Andre Vieira (andre-simoesdiasvieira) said :
#1

Hi Erman,

Any chance you can send us the 't.o' you are using? I am not able to reproduce that behavior here.

Also, on what OS are you running objdump?

Cheers,
Andre

Revision history for this message
Arif Erman Kulunyar (kulunyar) said :
#2

Hi Andre,

I am running it on Windows 7, with Cygwin installed (Cygwin_NT-6.1, 1.7.30 (0.272/5/3)).

The command I run:

arm-none-eabi-objdump -d -marm my_file.o //runs OK with GCC 4.7.4, gives empty output with GCC 5.2.1

My compile options (both compile and link) are below. By the way, I can't see the vectorization outputs either (were able to see them when compiling with 4.7.4)

# Compile options.
C_OPTS = -Wall \
-std=gnu99 \
-fgnu89-inline \
-Wcast-align \
-Werror=uninitialized \
-Werror=maybe-uninitialized \
-Werror=overflow \
-mcpu=cortex-a15 \
-mtune=cortex-a15 \
-mabi=aapcs \
-mfpu=neon \
-ftree-vectorize \
-ftree-vectorizer-verbose=4 \
-mfloat-abi=hard \
-O3 \
-flto \
-marm \
-fno-gcse \
-fno-strict-aliasing \
-fno-delete-null-pointer-checks \
-fno-strict-overflow \
-fuse-linker-plugin

# Linker options.
L_OPTS = -nostartfiles \
-Wcast-align \
-std=gnu99 \
-fgnu89-inline \
-static \
-Wl,--gc-sections \
-Wl,-Map,$(BUILD_DIR)/$(PROJ).map \
-mcpu=cortex-a15 \
-mtune=cortex-a15 \
-mabi=aapcs \
-mfpu=neon \
-ftree-vectorize \
-ftree-vectorizer-verbose=4 \
-mfloat-abi=hard \
-O3 \
-flto \
-marm \
-fno-gcse \
-fno-strict-aliasing \
-fno-delete-null-pointer-checks \
-fno-strict-overflow \
-fuse-linker-plugin

Thank you Andre,

Erman

Revision history for this message
Best Andre Vieira (andre-simoesdiasvieira) said :
#3

Hi Erman,

I think you want to use '-ffat-lto-objects'.

From: https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Optimize-Options.html#Optimize-Options
"-ffat-lto-objects
    Fat LTO objects are object files that contain both the intermediate language and the object code. This makes them usable for both LTO linking and normal linking. This option is effective only when compiling with -flto and is ignored at link time.

    -fno-fat-lto-objects improves compilation time over plain LTO, but requires the complete toolchain to be aware of LTO. It requires a linker with linker plugin support for basic functionality. Additionally, nm, ar and ranlib need to support linker plugins to allow a full-featured build environment (capable of building static libraries etc). GCC provides the gcc-ar, gcc-nm, gcc-ranlib wrappers to pass the right options to these tools. With non fat LTO makefiles need to be modified to use them.

    The default is -fno-fat-lto-objects on targets with linker plugin support."

Cheers,
Andre

Revision history for this message
Arif Erman Kulunyar (kulunyar) said :
#4

Thank you very much Andre,

That solved my problem. However (as I suspected) GCC 5.2.1 won't try auto-vectorization with my options. But I will create a new topic for this one.

Erman

Revision history for this message
Arif Erman Kulunyar (kulunyar) said :
#5

Thanks Andre Vieira, that solved my question.