mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
The cros-compiler doesn't support backtrace(3) when linked statically. Until that's fixed, just don't use it. BUG=chromium:437107 BRANCH=ToT, samus TEST=manual FEATURES=test emerge-link vboot_reference /build/link/usr/bin/futility_s gbb_utility -c 100,100,100,100 test.bin /build/link/usr/bin/futility_s gbb_utility -s --hwid=HEY test.bin Change-Id: I66b76fc8c0aa92f95976c5d5015f62730bb12064 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/232234 Reviewed-by: Mike Frysinger <vapier@chromium.org>
40 lines
740 B
C
40 lines
740 B
C
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* Workaround for TODO(crbug.com/437107). Remove this file when it's fixed.
|
|
*/
|
|
|
|
#define _STUB_IMPLEMENTATION_
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "vboot_api.h"
|
|
|
|
void *VbExMalloc(size_t size)
|
|
{
|
|
void *p = malloc(size);
|
|
|
|
if (!p) {
|
|
/* Fatal Error. We must abort. */
|
|
abort();
|
|
}
|
|
|
|
return p;
|
|
}
|
|
void VbExFree(void *ptr)
|
|
{
|
|
free(ptr);
|
|
}
|
|
|
|
|
|
/*
|
|
* This file should be used only when building the static version of futility,
|
|
* so let's intentionally break any tests that link with it by accident.
|
|
*/
|
|
int vboot_api_stub_check_memory(void)
|
|
{
|
|
return -1;
|
|
}
|