Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

Debug Section (aranges,pubnames,info,...)

Altera_Forum
Honored Contributor II
1,047 Views

The contents of the debug sections produced via a nois2-elf-objdump of the ELF file is shown below.  

The compilation options surrounding the ELF output is NDEBUG/Release Mode/o3 Optimization.  

I'd like to reduce the size of the ELF, hence the question: 

a) What is the purpose of this debug information and will removing it produce any side effects? 

B) Assuming no side effects is there a compiler option that I could use to remove this debug information? 

 

 

Sections: 

 

Idx Name Size VMA LMA File off Algn 

12 .comment 00002f44 00000000 00000000 000b6198 2**0 

CONTENTS, READONLY 

13 .debug_aranges 00002d80 00000000 00000000 000b90e0 2**3 

CONTENTS, READONLY, DEBUGGING 

14 .debug_pubnames 00013ca9 00000000 00000000 000bbe60 2**0 

CONTENTS, READONLY, DEBUGGING 

15 .debug_info 000f2d16 00000000 00000000 000cfb09 2**0 

CONTENTS, READONLY, DEBUGGING 

16 .debug_abbrev 00016a4e 00000000 00000000 001c281f 2**0 

CONTENTS, READONLY, DEBUGGING 

17 .debug_line 00053a47 00000000 00000000 001d926d 2**0 

CONTENTS, READONLY, DEBUGGING 

18 .debug_frame 000098b4 00000000 00000000 0022ccb4 2**2 

CONTENTS, READONLY, DEBUGGING 

19 .debug_str 000206ea 00000000 00000000 00236568 2**0 

CONTENTS, READONLY, DEBUGGING 

20 .debug_alt_sim_info 00000050 00000000 00000000 00256c54 2**2 

CONTENTS, READONLY, DEBUGGING 

21 .debug_ranges 00009be8 00000050 00000050 00256ca4 2**0 

CONTENTS, READONLY, DEBUGGING 

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
381 Views

These sections are useless for executing. It depends how you load the program for Nios: basically for execution you only need ".entry .text .rodata .exceptions .rwdata" i.e. these are the sections that form the memory footprint that Nios IDE copies to the RAM. I you use tools like elf2sof or something similar they are automatically discarded by the tool. 

 

regards 

0 Kudos
Reply