Commit 807bedbe authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

piegen: add --pcrelocs/-r option

nr_gotpcrel is the last variable which name we can't set with piegen's
option. Let's introduce option for that.
It will help for including two generated blobs simultaneously.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent c844b3f2
...@@ -75,13 +75,14 @@ int main(int argc, char *argv[]) ...@@ -75,13 +75,14 @@ int main(int argc, char *argv[])
void *mem; void *mem;
int fd; int fd;
static const char short_opts[] = "f:o:s:p:v:h"; static const char short_opts[] = "f:o:s:p:v:r:h";
static struct option long_opts[] = { static struct option long_opts[] = {
{ "file", required_argument, 0, 'f' }, { "file", required_argument, 0, 'f' },
{ "output", required_argument, 0, 'o' }, { "output", required_argument, 0, 'o' },
{ "stream", required_argument, 0, 's' }, { "stream", required_argument, 0, 's' },
{ "sym-prefix", required_argument, 0, 'p' }, { "sym-prefix", required_argument, 0, 'p' },
{ "variable", required_argument, 0, 'v' }, { "variable", required_argument, 0, 'v' },
{ "pcrelocs", required_argument, 0, 'r' },
{ "help", required_argument, 0, 'h' }, { "help", required_argument, 0, 'h' },
{ }, { },
}; };
...@@ -110,6 +111,9 @@ int main(int argc, char *argv[]) ...@@ -110,6 +111,9 @@ int main(int argc, char *argv[])
case 'v': case 'v':
opts.var_name = optarg; opts.var_name = optarg;
break; break;
case 'r':
opts.nrgotpcrel_name = optarg;
break;
case 'h': case 'h':
default: default:
goto usage; goto usage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment