Ld: cannot find /ubuntu/omnibook/sections.lds: No

  
 

Compile and download the linux-source-2.6.32 kernel source code, the following error can not continue:

ld: can not find /ubuntu/omnibook/sections.lds: No such file or directory

Cause and Solution:

This is because a directory in the makefile gets an error and can be fixed. The specific solution is as follows.

Edit File

/usr/src/linux-source-2.6.32/ubuntu/omnibook/Makefile

Find:

ifeq ($( KERNELRELEASE),)# Support for direct Makefile invocation

Add a line in front of it:

PWD=$(shell pwd)

You can also refer to the following steps (principle Same):

$pwd/usr/src/mylinux-source-2.6.38$sudo vim +160 ubuntu/omnibook/Makefile

After opening the Makefile, look for the following statement:

160 #EXTRA_LDFLAGS += $(src)/sections.lds161 EXTRA_LDFLAGS += $(PWD)/ubuntu/omnibook/sections.lds

Modification Method 1:

160 # EXTRA_LDFLAGS += $(src)/sections.lds161 PWD = $(shell pwd) 162 EXTRA_LDFLAGS += $(PWD)/ubuntu/omnibook/sections.lds

Modification Method 2:

160 EXTRA_LDFLAGS += $(src)/sections.lds161 #EXTRA_LDFLAGS += $(PWD)/ubuntu/omnibook/sections.lds

Copyright © Windows knowledge All Rights Reserved