From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Jiri B <jirib@devio.us>
Cc: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>,
The development of GNU GRUB <grub-devel@gnu.org>,
bug-grub@gnu.org
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 [thread overview]
Message-ID: <56EB7577.2010503@gmail.com> (raw)
In-Reply-To: <20160317205641.GB32407@wolfman.devio.us>
17.03.2016 23:56, Jiri B пишет:
>>>> [...]
>>>> Well, your compiler managed to create shared library instead of
>>>> executable file:
>>>>
>>>> bor@bor-Latitude-E5450:~$ 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.
>
next prev parent reply other threads:[~2016-03-18 3:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160312165742.GR17281@wolfman.devio.us>
2016-03-12 18:29 ` [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' Andrei Borzenkov
2016-03-12 19:54 ` Jiri B
2016-03-13 5:41 ` Andrei Borzenkov
2016-03-14 18:19 ` Jiri B
2016-03-14 18:46 ` Andrei Borzenkov
2016-03-17 10:12 ` Jiri B
2016-03-17 15:54 ` Andrei Borzenkov
2016-03-17 16:04 ` Vladimir 'phcoder' Serbinenko
2016-03-17 16:07 ` Andrei Borzenkov
2016-03-17 20:56 ` Jiri B
2016-03-18 3:26 ` Andrei Borzenkov [this message]
2016-03-18 13:01 ` Jiri B
2016-03-18 16:53 ` Andrei Borzenkov
2016-03-18 19:48 ` Vladimir 'phcoder' Serbinenko
2016-03-22 10:31 ` Jiri B
2016-03-22 17:48 ` Andrei Borzenkov
2016-03-24 3:55 ` Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56EB7577.2010503@gmail.com \
--to=arvidjaar@gmail.com \
--cc=bug-grub@gnu.org \
--cc=grub-devel@gnu.org \
--cc=jirib@devio.us \
--cc=phcoder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).