Skip to content

Commit

Permalink
Merge pull request #81 from pobrn/add_retain_attr
Browse files Browse the repository at this point in the history
vabackend: retain section from linker garbage collection
  • Loading branch information
elFarto authored May 10, 2022
2 parents 96f0428 + 21ecb9e commit 14e15d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vabackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ void logger(const char *filename, const char *function, int line, const char *ms
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#define PTROFF(base, bytes) ((void *)((unsigned char *)(base) + (bytes)))
#define DECLARE_CODEC(name) \
__attribute__((used, section("nvd_codecs"), aligned(__alignof__(NVCodec)))) \
__attribute__((used)) \
__attribute__((retain)) \
__attribute__((section("nvd_codecs"))) \
__attribute__((aligned(__alignof__(NVCodec)))) \
NVCodec name

#endif // VABACKEND_H

0 comments on commit 14e15d9

Please sign in to comment.