grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefine


From: Andrei Borzenkov
Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition'
Date: Fri, 18 Mar 2016 06:26:47 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

17.03.2016 23:56, Jiri B пишет:
>>>> [...]
>>>> Well, your compiler managed to create shared library instead of
>>>> executable file:
>>>>
>>>> address@hidden:~$ LANG=C objdump -f Загрузки/lzma_decompress.image
>>>>
>>>> Загрузки/lzma_decompress.image:     file format elf32-i386
>>>> architecture: i386, flags 0x00000050:
>>>> HAS_SYMS, DYNAMIC
>>>> start address 0x00008200
>>>>
>>>> I get the same if I explicitly add -shared to linker flags.
>>>>
>>>> Could you test with
>>>>
>>>> ./configure TARGET_LDFLAGS=-static
> 
> TARGET_LDFLAGS=-static caused no difference. But... While being
> a little bit desperate I had a look at grub 0.9.x in OpenBSD ports
> and there was
> 
>   CFLAGS=-ftrampolines -fno-stack-protector -fno-pie -nopie
> 
> So I gave it a try and it seems better (?)
> 
> $ ls -l 
> /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.im*
> -rwxr-xr-x  1 jirib  wheel  3068 Mar 17 21:45 
> /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.image*
> -rw-r--r--  1 jirib  wheel  2832 Mar 17 21:45 
> /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.img
> 
> $ objdump -f 
> /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.image
> 
> /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.image:
>      file format elf32-i386
> architecture: i386, flags 0x00000002:
> EXEC_P
> start address 0x00008200
> 
> It is OK?
> 

It certainly looks better than before. Does it actually work?

We aready use -fno-PIE, looks like we need to explicitly check for
-fno-pie as well.

> grub 0.9.x in OpenBSD ports is for i386 arch only (not for 64bit one).
> I have no idea why, I'll ask on ports@ list some OpenBSD porters.
> 
> j.
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]