LDS Script Error: insufficient program headers
Hi,
I am building a project using the GNU / Cygwin tool chain, cross compiled for the MIPS-ELF.
My problem involves the linker, ld (really mips-elf-ld). I receive this error
message, when I build.
mips-elf-ld:
project.out: Not enough room for program headers, try linking with -N
mips-elf-ld: final link failed: Bad value
dmake.exe: Error code 129, while making '\project.out'
I modified a sample that I was given, the sample does not for whatever reason have to deal with
insufficent headers, so the LDS mapping file does not have anything
there that I can use. I am trying on my own to solve the problem, but
so far no luck.
Further Information: Adding in the line ". = SIZEOF_HEADERS;" as the
first line in the SECTIONS block, changes the error message to saying
that the linker allocated 3 headers but needs space for 16. What do I
have to add to the LDS file to solve the problem?
I tried to add a PHDRS block, as the unversal example does
not give enough information to tailor it to my needs. The internet example is:
PHDRS
{
headers PT_PHDR PHDRS ;
interp PT_INTERP ;
text PT_LOAD FILEHDR PHDRS ;
data PT_LOAD ;
dynamic PT_DYNAMIC ;
}
Adding this block makes the problem worse or at the least does not
solve the problem. I tried adding in various things to this block,
after adding it, but got nowhere.
Is there some way to just state that number, since I now know that I
need 16 headers. I did research and know that one header is 32-bytes.
Thanks in advance,
Sarah
Categories
- All Categories
- 178 LFX Mentorship
- 178 LFX Mentorship: Linux Kernel
- 775 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 103 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 15 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 41 Cloud & Containers Training
- 5 Cybersecurity Training
- 4 DevOps & Site-Reliability Training
- 3 Linux Kernel Development Training
- 2 Networking Training
- 2 Open Source Best Practice Training
- 5 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 798 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 774 Linux Distributions
- 82 Debian
- 68 Fedora
- 24 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 472 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 103 Linux Security
- 79 Network Management
- 102 System Management
- 46 Web Management
- 171 Mobile Computing
- 32 Android
- 124 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 407 Off Topic
- 128 Introductions
- 35 Study Material
- 1.1K Programming and Development
- 311 Kernel Development
- 725 Software Development
- 1K Software
- 419 Applications
- 183 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)